According to Simon Urli the regression is related to XWIKI-24121
Also, according to Nikita Petrenko, the issue doesn't reproduce on XWiki 15.10.
Caused by XWIKI-23043