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

See https://code.djangoproject.com/ticket/16731#comment:11
A free option for getting the tests running with Oracle is outlined [on the wiki](https://code.djangoproject.com/wiki/OracleTestSetup#using-the-oracle-developer-day-pre-installed-vm) if you are interested.