code: private boolean isGlobalVarReference(String name, Scope s) {
      Var v = s.getVar(name);
      if (v == null && externsScope != null) {
        v = externsScope.getVar(name);
      }
      return v != null && !v.isLocal();
    }
docs: Determines whether a variable name reference in a particular scope is a global variable
  reference.
  
  @param name A variable name (e.g. "a")
  @param s The scope in which the name is referenced
  @return Whether the name reference is a global variable reference