Adding a generic topological sort for the update pipeline.

Just use the field instead of having a private property for this?