HPCC-12439 Fix potential crash and row corruption in JOIN

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

HPCC-12439 Fix potential crash and row corruption in JOIN

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>