Fixes Github Issue #140

This issue happens when a software is both a transitive
dependency at the software level, and a top level project
dependency. We were blindly shifting all the project deps
to the end of the build order as an optimization, and failed
to check for the case where we actually *needed* that software
in the right place.

This patch ensures that, if the software is a dependency of
any other software description, it does not get shifted to the
end.