HPCC-10020 Optimize IF(EXISTS(x), x) to x

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

HPCC-10020 Optimize IF(EXISTS(x), x) to x

Reviewed-By: Jamie Noss <james.noss@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>