public void leaving(String context) {
        if (context == null) return;
        if (currentContext == null) return;
        if (currentContext.equals(context))
            currentContext = null;
    }
Advances currentItem to the next term item and returns thatItem.
If the current item before this call is the last item, this will
return (and set currentItem to) null.
container-search/src/main/java/com/yahoo/prelude/semantics/engine/RuleEvaluation.java