code: private boolean inLoop(Node n) {
      Node enclosingNode = NodeUtil.getEnclosingNode(n, isLoopOrFunction);
      return enclosingNode != null && !enclosingNode.isFunction();
    }
docs: Whether n is inside a loop. If n is inside a function which is inside a loop, we do not
  consider it to be inside a loop.