Fix building tests/benches in some circumstances
Fix building tests/benches in some circumstances

It was doing the "all-in-one" build logic when initially adding wanted
dependencies. However, this broke in the circumstance where some other
local package depends on the package with the tests / benchmarks.  If
the dependencies for the downstream package are chased first, this led
to the "all-in-one" logic not executing.

Regression introduced in 85c5a3973a0a7199cefe522ab820a070c0961440

achernyak/stack,sjakobi/stack,vigoo/stack,juhp/stack,narrative/stack,rubik/stack,anton-dessiatov/stack,deech/stack,mrkkrp/stack,sjakobi/stack,luigy/stack,MichielDerhaeg/stack,luigy/stack,anton-dessiatov/stack,Heather/stack,achernyak/stack,martin-kolinek/stack,MichielDerhaeg/stack,harendra-kumar/stack,deech/stack,Blaisorblade/stack,AndrewRademacher/stack,keent/stack,vigoo/stack,AndrewRademacher/stack,phadej/stack,mrkkrp/stack,rvion/stack,rubik/stack,juhp/stack,keent/stack,Blaisorblade/stack,AndreasPK/stack,narrative/stack,AndreasPK/stack,phadej/stack,harendra-kumar/stack,Heather/stack,martin-kolinek/stack,Fuuzetsu/stack,rvion/stack,Fuuzetsu/stack