- Don't need to sort task dependencies when building the graph, only when traversing.
- Renamed a method to make its side-effects a bit more obvious.
Moved task filtering up to where we build the task graph, so that we don't unnecessarily build the graph for filtered tasks.