Tests for #14461

See [#14461](https://code.djangoproject.com/ticket/14461).