Fixed handling of mixed real/int ternary expressions