Fix issue where recursive building only worked for first level of missing dependencies.