Fix logic issue in build order resolver

This system broke when I fixed the other bug which added the package
dependency where it should have not.