See https://github.com/xwiki/xwiki-platform/commit/622c32bcb006d50a6b5a233c8a72901906f73e68#commitcomment-8356448