A person in jail on a criminal charge that has been certified or otherwise transferred from a district court to a circuit court shall be discharged from imprisonment if a presentment, indictment or information be not found or filed against him before the end of the second term of the court at which he is held to answer, unless it appear to the court that material witnesses for the Commonwealth have been enticed or kept away or are prevented from attendance by sickness or inevitable accident, and except, also, in the cases provided in §§ 19.2-168.1 and 19.2-169.1. A discharge under the provisions of this section shall not, however, prevent a reincarceration after a presentment or indictment has been found.
Va. Code § 19.2-242