Suppose we have a situation that invalidate Imam's salat, like flatulence, or, death or any other thing during the salat.
What should we do in that case?
There is a hadith in Musnad Ahmed narrated from 'Ali: While we were with Allah's Messenger praying, He suddenly left and we were in the position of qiyaam then came back with his head dripping with water, He then led us in the prayer and when we finished he faced us and said: "I had remembered that I was in a state of uncleanliness and I did not wash myself when I went for the prayer, so whoever among you feels a strange feeling in his stomach or gets into the same situation as me then he should leave and do what he needs to do and wash up then return to the prayer."
Besides this situation, there's no other evidence where we can say otherwise. The prayer has to be restarted if any other matter occurs. Allaho Alim.