Fix order of nodes in traverse-all.

The traverse-all function was prepending newly discovered nodes which
would cause the scc algorithm to fail to discover the correct
strongly-connected components on certain graphs.  This fixes the
ordering of the nodes, which in turn fixes the SCC problem.