fix parsing of [X<T>=] and (X<T>=) for #1018