Can you come up with a scenario where this wouldn't end?  My mathing on the algorithm tells me it should always end, even if we just run out of results from the search index.