private ExpressionNode transformIf(IfNode node) {
        if ( ! isConstant(node.getCondition())) return node;

        if ((node.getCondition().evaluate(null)).asBoolean())
            return node.getTrueExpression();
        else
            return node.getFalseExpression();
    }
Returns true if the operator at i binds at least as strongly as the neighbouring operators on each side (if any).
This check works because we simplify by decreasing precedence, so neighbours will either be single constant values
or a more complex expression that can't be simplified and hence also prevents the simplification in question here.
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/transform/Simplifier.java