(c) An order terminating an action is not a bar to prosecution if a complaint is dismissed before the commencement of a preliminary hearing in favor of an indictment filed pursuant to Section 944 and the indictment is based upon the same subject matter as charged in the dismissed complaint, information, or indictment. However, if the previous termination was pursuant to Section 859b, 861, 871, or 995, the subsequent order terminating an action is not a bar to prosecution if:
(1) Good cause is shown why the preliminary examination was not held within 60 days from the date of arraignment or plea.(2) The motion pursuant to Section 995 was granted because of any of the following reasons: (A) Present insanity of the defendant.(B) A lack of counsel after the defendant elected to self-represent rather than being represented by appointed counsel.(C) Ineffective assistance of counsel.(D) Conflict of interest of defense counsel.(E) Violation of time deadlines based upon unavailability of defense counsel.(F) Defendant's motion to withdraw a waiver of the preliminary examination.(3) The motion pursuant to Section 995 was granted after dismissal by the magistrate of the action pursuant to Section 871 and was recharged pursuant to Section 739.