   /// Careful: job may not be primary.
 
   public func collectJobsDiscoveredToBeNeededAfterFinishing(
-    job finishedJob: Job) throws -> [Job]? {
-    unfinishedCompileJobs.remove(finishedJob)
-
+    job finishedJob: Job) throws -> [Job] {
     // Find and deal with inputs that now need to be compiled
     let invalidatedInputs = collectInputsInvalidatedByRunning(finishedJob)
     assert(Set(invalidatedInputs).isDisjoint(with: finishedJob.primaryInputs),

          "Queuing because of dependencies discovered later:", input)
      }
    }
    let newJobs = try getJobs(for: invalidatedInputs)
    unfinishedCompileJobs.formUnion(newJobs)
    if unfinishedCompileJobs.isEmpty {
      // no more compilations are possible
      return nil
    }
    return newJobs
  }

  /// After `job` finished find out which inputs must compiled that were not known to need compilation before


    self.skippedCompileGroups = initial.skippedCompileGroups
    self.mandatoryJobsInOrder = initial.mandatoryJobsInOrder
    self.jobsAfterCompiles = jobsInPhases.afterCompiles
    self.moduleDependencyGraph = initial.graph
    self.driver = driver
