Fix inversion of character class.