HPCC-11844 Fix inconsistency generated in expression tree

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