Commit done in XWIKI-22416 at https://github.com/xwiki/xwiki-platform/commit/3447bac26faadf5d4f93b60e9ab283fed1927fbd was supposed to be for this issue.