Cleanup of for sharing it more consistently across the code

Related to ticket [#20450](https://code.djangoproject.com/ticket/20450)