code: private static boolean isSetFromPrecedingModule(
        Ref originalRef, Ref set, JSModuleGraph moduleGraph) {
      return set.type == Ref.Type.SET_FROM_GLOBAL
          && (originalRef.getModule() == set.getModule()
              || moduleGraph.dependsOn(originalRef.getModule(), set.getModule()));
    }
docs: Whether the set is in the global scope and occurs in a module the original ref depends on