code: private boolean isGlobalNameReference(String name, Scope s) {
      String topVarName = getTopVarName(name);
      return isGlobalVarReference(topVarName, s);
    }
docs: Determines whether a name reference in a particular scope is a global name reference.
  
  @param name A variable or property name (e.g. "a" or "a.b.c.d")
  @param s The scope in which the name is referenced
  @return Whether the name reference is a global name reference