Mark,
Do not use the /dataRecordsOut/header in the outarray.
If your intention is to do some mapping on the header while looping and still have it in the recordlist.
While you are looping map to some record outstruct and have this as outarray and outside the loop you can use this
outstruct as record list,and perform further processing by mapping it to /dataRecordsOut/header .
Hopefully this helps.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB