Fix limit with GROUP BY in Oracle

I think this fix is fairly straight-forward. There's also a test case here demonstrating the problem.

References #128