Fix recursive getObject() call

Recursive calls can only end by throwing StackOverflowErrors