The following proceedings will not constitute an acquittal of the same offense:
(1) If the defendant was formerly acquitted on the ground of a variance between the accusatory instrument and the proof; or(2) If the accusatory instrument was:
(a) Dismissed upon a demurrer to its form or substance;(b) Dismissed upon any pretrial motion; or(c) Discharged for want of prosecution without a judgment of acquittal.