HSEARCH-2459 Open would probably help in fixing this issue. The code handling the recursion is currently quite complex, and more importantly, spread across multiple classes/methods, which makes it difficult to understand.