Make tbuilder ldeps search more reliable