Break infinite loop by using a block as a stubbed object key instead of the object itself