Note: this issue doesn't affect 17.2.0RC1 as it hasn't been released yet, I should have pushed the fix in master associated to XWIKI-22583.