Fix validating the configuration graph.

getTopologicalPackageList(), which was used before, could yield a different set of packages.