XWIKI-10777: Random "Failed to get localization bundle" when restarting the server

(cherry picked from commit 36663d1067172e34aefdf5d1827a8172565e5b7e)