HPCC-12378 WHEN clause triggered on the false branch of an IF, in Roxie

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #6561 from richardkchapman/if-when

HPCC-12378 WHEN clause triggered on the false branch of an IF, in Roxie

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>