Description
The dfdl:occursIndex() function currently returns the iteration number of the current array element. But if emptyElementParsePolicy="treatAsMissing", then we might not actually add an element but occursIndex will still increment.
This function needs to take into account that the iteration count is not the same as the infoset count and only return the index of the current element in the infoset.
We may also want to inspect other places where else we use the iteration count when we really want the infoset count.