Both this and XWIKI-22202 are precise use cases:
Matching on the .xHint class seems correct to me, it fixes both this and XWIKI-22202...