HPCC-9478 - Nested global loop crash

Nested global loop crashed on 2nd iteration, because the internal
result set (for loop counter, input and output streams) wasn't
being reinitialized.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>