Reduce search depth in generic-function-finder

It was taking up a significant chunk on profiles.