Should surround case-insensitive chains with brackets while expanding them.

before: 'aa'? ----> [aA][aA]?
now   : 'aa'? ----> ([aA][aA])?