Fix improper inlining into ternaries