XWIKI-10231: Cannot install/merge XWikiPreferences with Distribution Wizard on subwiki

(cherry picked from commit acc3d029d3aaa8bc6c7b78db87d50a8ba537f2b6)

Conflicts:
	xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
XWIKI-10231: Cannot install/merge XWikiPreferences with Distribution Wizard on subwiki
* fix typo

(cherry picked from commit c89e47c4b3fd5f24eba00c323a8193d23bd986bc)