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

See https://code.djangoproject.com/ticket/16731#comment:11
Ok, I started downloading the huge VM file. I'll see if I can make it work...