We use subselect in xed:repeat combined with xpath as parameter. See resulting XML:
MCRXPathBuilder.buildPositionPredicate() only adds position bracket if it is second element or third ....
This leads to problems if xpath parameter means first occurance of mods:name instead of all occurances of mods:name. So in the above described case we need mods:name as xpath instead of mods:name.
Can be fixed by changing line 115 from
return (pos == 0 ? "" : "[" + ++pos + "]");
return "[" + ++pos + "]";