Note that this issue is now fixed via:
https://github.com/discourse/discourse/commit/244628ed983cf318f9eee56d4b852d6efaede29c
When you update your Discourse instance to latest version, the custom text for login_required.welcome_message will be copied to login_required.welcome_message_invite_only (if it’s not modified).
Since you’ve already added the custom text for login_required.welcome_message_invite_only the above change will not affect your site, so nothing to worry.
Thanks for the bug report.