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

See https://code.djangoproject.com/ticket/16731#comment:11
Actually I don't remember why I did that, Oracle should have support for that too.
I have no Oracle database but I will try something and just see if the build passes...