Topologically sort BlockGraphs and ClassGraphs so that we can easily walk them in order