HPCC-8907 Fix potential core/internal error constant folding CASE

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