LocaleURLMiddleware: Avoid exception when processing rest_framework responses.