Fix superscript group escaping