XWIKI-10617: StackOverflow exception on startup with possibly corrupted extensions
* this commit is more about making the initializer stronger but there is no much we can do to workaround the real cause

(cherry picked from commit eff16d9aad191c930dd1ec4846c46ef2ae76cd16)