A person shall not be considered as having been in jeopardy in a trial in which:
(1) The court was illegally constituted or lacked jurisdiction;
(2) The prosecution was dismissed because it was instituted in an improper venue; or
(3) The indictment was invalid.