As unladylike as it is, whenever I smell something horrid, I absolutely refuse to swallow whatever is in my mouth, and I will spit. This is because I know that the taste buds and the scent glands are intricately connected, which is the reason why you can taste your food. It is also the reason that you cannot taste your food when you have a cold.
In my mind, if I am smelling something rancid, I am also tasting something rancid, and that just won't do. I have to spit. I have gone as long as 20 minutes until I could find a proper place to dispose of the contents of my mouth. Judge me all you want, I have limited shame about this.
This is very similar to my behavior of breathing through my mouth when the scent overrides my faculties. There are times when certain odors are so foul, so pungent, that I would rather let them enter my mouth than breathe them in. Seems counter-intuitive, I know, but at least when I'm breathing through my mouth, I'm not aware of the stank-i-ness that surrounds me.
I bet you'll think twice!