#20836 to_field lost when adding via raw_id_fields

Sorry, it's against 1.6.x. I don't have easy access to python2.7 for master.

Basically, TO_FIELD_VAR really needs to follow IS_POPUP_VAR everywhere it goes. Whenever it's a popup, there's always the possibility that there's a to_field.

https://code.djangoproject.com/ticket/20836