If the motion to set aside the indictment or any exception thereto is sustained, but the court refuses to discharge the defendant, then at the expiration of ten days from the order sustaining such motions or exceptions, the defendant shall be discharged, unless in the meanwhile complaint has been made before a magistrate charging him with an offense, or unless another indictment has been presented against him for such offense.
Tex. Code Crim. Proc. § 28.08