Fix a KeyError when using custom (non-django) fields