Fixed test-code regression leading to StackOverflowError