Where a person once discharged or admitted to bail is afterward indicted for the same offense for which he has been once arrested, he may be committed on the indictment, but shall be again entitled to the writ of habeas corpus, and may be admitted to bail, if the facts of the case render it proper; but in cases where, after indictment is found, the cause of the defendant has been investigated on habeas corpus, and an order made, either remanding him to custody, or admitting him to bail, he shall neither be subject to be again placed in custody, unless when surrendered by his bail, nor shall he be again entitled to the writ of habeas corpus, except in the special cases mentioned in this Chapter.
Tex. Code Crim. Proc. § 11.57