https://code.djangoproject.com/ticket/23305