Fixed #22550 -- Raise error on QuerySet reverse after slicing.

https://code.djangoproject.com/ticket/22550
I see we use assert elsewhere, but I would prefer to raise an exception as asserts are ignored when running with `python -O`.