Copy previous answers within a repeat group

Hi

Recently, I was trying to copy the last answers within a repeat group in the next repetition.

So far it works on enketo but it does not in ODK Collect.
I think the problem is the index parameter in the indexed-repeat formula which catches the previous answers.
The behavior in enketo is as expected, but these fields only update after the calculation cell condition of the variables within the repeat is true. (copy previous answers? y/n) even when the index number had changed already.
In ODK Collect, after doing the previously mentioned, the app crashes showing the next error message:

Xpath evaluation: type mismatch This field is repeated: You may need to use the indexed-repeat() function to specify which value you want.

This makes me think about a problem in the trigger but, it is supposed to work with the last update of the referenced variable, right?

I'll appreciate your help
Thanks.

previous answer within a repeat group.xlsx (11.8 KB)

Have you taken a look at related docs?

I think Default to previous value - #8 by LN is also on the same topic.