Ticket #5214: Don't read out of bounds upon invalid ternary operator.