self.flags -> self.ignorecase. wrong reference