Possibly fixed a bug related to https://code.djangoproject.com/ticket/20020