HPCC-12439 Fix potential crash and row corruption in JOIN

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>