Fix for Ticket #11160

This pull request fixes https://code.djangoproject.com/ticket/11160