public boolean isLoop() {
        // TODO: There are many more possible loops, we should probably detect a few more obvious ones
        if (conditionIsEllipsAndOtherNameSpacesOnly(getCondition())) return true;
        if (producesItself()) return true;
        return false;
    }
Returns true if it is known that this rule matches its own output.
If it does, it will only be evaluated once, to avoid infinite loops.
This default implementation returns false;
container-search/src/main/java/com/yahoo/prelude/semantics/rule/ProductionRule.java