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

(cherry picked from commit dc8fb4dfa6343866e254deaff212327ac18c0a7e)