Some cleanup in the dep resolver
Yay, annoying bugfix!