HPCC-9172 Fix mismatching records from datasets in MAP/CASE

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #4274 from ghalliday/issue9172

HPCC-9172 Fix mismatching records from datasets in MAP/CASE

reviwd-by;chapmn,'st.o