If a court grants a motion based on a defect in the institution of the prosecution or in the indictment or information, it may also order that the defendant be continued in custody or that his bail be continued for a specified time pending the filing of a new indictment or information. An order setting aside an indictment or information pursuant to this section is no bar to a further prosecution for the same offense. Nothing in this section shall be deemed to affect the provisions of any statute relating to periods of limitations.
SDCL 23A-8-11