The problem was that v5.2.0 trimmed the whitespace from $:/core/templates/store.area.template.html which we'd previously been relying on during the import.
This change still allows v5.2.2 to import encrypted pre-v5.2.0 wikis
Fixes#6330
Importing an encrypted wiki ordinarily doesn’t place the password in
the password vault on the basis that one ought to be able to import
from a file without automatically inheriting its password.
Now there’s a configuration option that can be used by the upgrade
plugin to cause the password vault to be updated with any password
entered by the user. The end result is that the user only needs to
enter their password once.