Fix infinite loop when a getter passes $this into a mock.

Fixed Issue #282