This patch fixes some problems related to message loading. Previously, when loading message files from script tags, translations appeared broken. If using a module loader, things worked correctly. Now, both cases should work correctly.
In this patch: #6289
Fixes: #6123
Note: This does not fix all of the issues reported in #4369 (namely, issues related to lazy loading or code splitting) but it may address some of the issues reported there that overlapped with #6123.