StackOverflowError when there are too many commits fix

A StackOverflowError occurs if there are too many commits in the database while reading indexes recursively. An iterative approach eliminates this problem. Also, there's a test to check it. But it's slow due to the need of many fsync commits. It just shows a current error and can be ignored after applying the fix.