HPCC-11844 Fix inconsistency generated in expression tree

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

HPCC-11844 Fix inconsistency generated in expression tree

Reviewed-By: Jamie Noss <james.noss@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>