Issues indexing nested repeats on 2nd, 3rd iterations (Blank questions)

1. What is the issue? Please be detailed.
Hi All, I am having some problems that I am assuming are related to indexing within nested repeats, but after tons of research on the various ODK forums and testing, I'm stumped. The survey uploads without error and the first iteration of the big repeat (for overall conflict types) runs fine/ as desired. However, if I say there is another type of resource-related conflict (effectively restarting the survey), I start receiving errors. On the webform, responses that normally generate follow-ups either don't trigger a follow-up question at all, or create a blank box (this is a bit difficult to explain) and/or start triggering follow-ups but one "behind" where they should be. In the app, I receive an error for the second iteration, saying there is a type mismatch.

Full disclosure, I am a new ODK user with no programming experience and am mostly self-taught, all to say I know what I'm asking is complex and I'm sure my form is a bit messy since I've largely been Googling my questions, copying formatting from forums and applying them in my form. I have learned a ton, but this problem seems to be over my head. I should also say - I cannot simply the questionnaire in terms of how/ what order the questions are asked (I am not the PI on the research).

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

I am attaching the form here - it should upload, then I suggest going through at least 2 types of resource related conflict and for select multiple questions, selecting at least 2 responses.

3. What have you tried to fix the issue?

I assume this is an issue with indexing so I've tried experimenting with different indexed repeat calculations, but so far nothing has worked (in the current form the index formulas will not be consistent throughout, as I am mostly testing within the farmer/farmer conflict type until I figure out the solution).

4. Upload any test forms or screenshots below.

ODK XLSForm community survey avec FR_alternate3.xlsx (39.8 KB)

When defining the logic for the repeat count resource_conflict_repeat is used as bare text instead of ${resource_conflict_repeat}. Kindly observe the standards when referencing variables in a form.