Similar to a side fix for the class editor in https://github.com/xwiki/xwiki-platform/pull/4860 XWIKI-17296