private boolean hasPrecedence(List<Operator> operators, int i) {
        if (i > 0 && operators.get(i-1).hasPrecedenceOver(operators.get(i))) return false;
        if (i < operators.size()-1 && operators.get(i+1).hasPrecedenceOver(operators.get(i))) return false;
        return true;
    }
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