Fixed #16731 -- Made pattern lookups work properly with F() expressions

See https://code.djangoproject.com/ticket/16731#comment:11
why not? If the database backend cannot support it, it should be controlled by a feature flag not a vendor check.