Apply patch from XWIKI-3544