Adding a generic topological sort for the update pipeline.

Possibly a method that takes the sidecar at this level rather than a flag? We should discuss.