XWIKI-10121: Failure to create wiki from template when the template wiki has extensions installed

(cherry picked from commit 74ef3473120cf1ec26e7fe00a457fce2ce460c1b)