How to debug a non-deterministic StackOverflowError?