Fix a text canonicalisation bug in CMS