When an indictment or presentment is quashed, or the proceedings on the indictment or presentment are set aside, or reversed on writ of error, the time during the pendency of the indictment or presentment so quashed, set aside or reversed shall not be reckoned within the time limited by this chapter, so as to bar any new indictment or presentment for the same offense.