Joining two document lists only works at top level

Wanna see something strange?

I’ve got parallel document lists that really should be combined into a single document list. The way to do this is to index one of the document lists while looping over the other one (be careful to subtract 1 from $iteration :wink:

Anyway, if I do it with the document lists being at the top level, it works fine.

As soon as the document lists are underneath a document list, it no longer works…

ie.
the code works when the structure is:
Doc1
–Field1
–Field2
Doc2
–Field3

mapped to
Doc3
–Field1
–Field2
–Field3

but doesn’t work with
MasterDocList
–Doc1
----Field1
----Field2
–Doc2
----Field3

mapped to
Doc4
–Field1
–Field2
–Field3

In the second case, Doc4 has only Fields 1 and 2.

It’s very odd, but that’s the situation I’m in.

I guess the workaround is to break things out into tiny little map flows that have three steps - loop, subtract 1 from $iteration, and map. It’s kind of frustrating though.