Check for deps only when components that need them are built
Split search into two callbacks