Detect unmatched bracket types.