This adds to d33ed98b by adding all rpaths of the client library to the global
search list before walking dependencies depth-first. This was originally intended like
this and missed by d33ed98b, which stops adding the client library's rpaths to
the list once a library is found.
Issue: #3850