[misc] Fix hack introduced by sdumitriu as a quick fix for the regression (XWIKI-10131) I introduced with XWIKI-8313.