Fixes #51

All previous tests pass. No new tests added though.. kind of difficult to test against infinite recursion. Please also have a look at my comment to the commit.