Technically, it was a bug in gettext and it is fixed now (but not released yet, probably will be included in the next version after 0.22.5). Somewhere in the future when everyone uses new gettext this workaround may no longer be needed.
raw_prefix has since moved to django/utils/translation/template.py.
It may be a few years before this ticket is actionable, hence "Someday/Maybe" status.