Fix querying-after-slice crash

On the recent edits page, attempting to filter was causing
a crashpage with the error:

AssertionError at /verify/

Cannot filter a query once a slice has been taken.

Change the order statements to slice after all filtering.