I see some tests are failing now, I'll check those.
The changes are looking good I think, but maybe we could add or adjust a test case that queries
filter_limit=-1 to ensure it returns the correct values.
@flamisz Looks good now. Feel free to merge if you are already done with adding tests.