   ## Resolution
 
   defp update_stale_sources(sources, removed, changed) do
+    # Remove delete sources
     sources =
-      Enum.reject(sources, fn source(source: source) -> source in removed end)
+      Enum.reduce(removed, sources, &List.keydelete(&2, &1, source(:source)))
+    # Store empty sources for the changed ones as the compiler appends data
     sources =
       Enum.reduce(changed, sources, &List.keystore(&2, &1, source(:source), source(source: &1)))
     sources

        module: module,
        kind: kind,
        source: source,
        beam: beam,
        binary: binary
      )


  end

  defp each_module(pid, cwd, source, module, binary) do
    {compile_references, runtime_references} = Kernel.LexicalTracker.remote_references(module)

    compile_references =
