Fix endless loop in CQL parser with unbalanced