From what I hear from friends who have been deployed in Islamic countries, this is actually a valid concern for the religious leaders.
I have read that if they pass gass while praying, that is also a major no-no. I don’t know whether their prayers are not accepted, if they have to get up and move to the back row, or even if they are responsible for the guy behind them passing out and hitting his head on the floor.