"XLSForm that looks up default values based on a selection" in a Repeat w/ Field-Lists

1. What is the issue?

Using the example of “XLSForm that looks up default values based on a selection” described Form Logic - ODK Docs, I added a second question (age) and I have no problem with the trigger/calculation populating the default when I wrap the questions in a field_list to get them on one page. However, if I place a repeat around it, then it appears that the trigger does not occur and the calculation does not populate the default. But if I remove the field_list while retaining the repeat, the trigger does seem to occur and the calculation populates the default.

I’m really confused because it works with field_list without a repeat and works with a repeat without a field_list.

2. What steps can we take to reproduce this issue?

Does not work:

selectlookuptest.xlsx (14.4 KB)

3. What have you tried to fix the issue?

Removing the field_list fixes this, but the desired behavior is to have both on same screen.

selectlookuptest-nofieldlist.xlsx (14.4 KB)

The triggers are happening and I can get it to work in Enketo using the following for the calculation:

instance('participants')/root/item[name=indexed-repeat(${participant}, ${repeat_group}, position(../..))]/phone_number

However, when I try to use it on the device (Connect) it gives me an error:

Error Occurred
Index 1 out of bounds for length 0

selectlookuptest-enketoworking.xlsx (14.5 KB)

Could this be a bug in Connect?

edit: I added this to an existing open issue on github.. maybe it's related: