TypeFinder: prefer iterative algorithm to keep stack usage low.