code: boolean isEscaped() {
      Scope hoistScope = null;
      for (Reference ref : references) {
        if (hoistScope == null) {
          hoistScope = ref.getScope().getClosestHoistScope();
        } else if (hoistScope != ref.getScope().getClosestHoistScope()) {
          return true;
        }
      }
      return false;
    }
docs: Whether the variable is escaped into an inner function.