Fixed search lookup

This fixes the `__search` lookup.

* Original pull request: #2597
* Trac: https://code.djangoproject.com/ticket/22489