Revert "Use exceptions to stop the search"

This reverts commit 11b1a76f35108316ee37d9d7056f4d621305a7ed.