     /// When building a graph from scratch, an unchanged but new-to-the-graph external dependendcy should be ignored.
     /// Otherwise, it represents an added Import
     let callerWantsTheseChanges = (phase.isUpdating && isNewToTheGraph) ||
-      lazyModTimer.hasExternalFileChanged
+      hasFileChanged(of: fed.externalDependency)
 
     guard callerWantsTheseChanges else {
       return DirectlyInvalidatedNodeSet()


    let isNewToTheGraph = fingerprintedExternalDependencies.insert(fed).inserted

    var lazyModTimer = LazyModTimer(
      externalDependency: fed.externalDependency,
      info: info)

    // If the graph already includes prior externals, then any new externals are changes
    // Short-circuit conjunction may avoid the modTime query
    let shouldTryToProcess = info.isCrossModuleIncrementalBuildEnabled &&
      (isNewToTheGraph || lazyModTimer.hasExternalFileChanged)

    // Do this no matter what in order to integrate any incremental external dependencies.
    let invalidatedNodesFromIncrementalExternal = shouldTryToProcess

    // return anything that uses that dependency.
    return invalidatedNodesFromIncrementalExternal ?? collectUntracedNodesUsing(fed)
  }

  private func hasFileChanged(of externalDependency: ExternalDependency
  ) -> Bool {
    if let hasChanged = externalDependencyModTimeCache[externalDependency] {
      return hasChanged
    }
    let hasChanged = (externalDependency.modTime(info.fileSystem) ?? .distantFuture)
      >= info.buildTime
    externalDependencyModTimeCache[externalDependency] = hasChanged
    return hasChanged
  }

  /// Try to read and integrate an external dependency.
