     for child in reversedDependencies[finishedParent.names[0]] or []
       removeDependency child.set, name for name in finishedParent.names
       moveToIndependent child if child.set.numDependencies is 0
+
+  for node in sorted
+    node.set = node.origSet
 
   for parent of dependencies
     throw new Error "Cyclic definitions between #{(name for name of dependencies).join ','}"

    {missing, names, def, set} = where
    stillMissingNames = addAllTo dependencySet(),
      (name for name in (setToArray missing) when not inSet defined, name)
    if stillMissingNames.numDependencies == 0 and set.numDependencies == 0
      hoisted.push def
      addAllTo hoistedNames, names
    else

        def: def
        names: names
        missing: stillMissingNames
        set: stillMissingDeps
  [hoisted, notHoisted]

addAllTo = (set, array) ->
