And it is not just Runners who may have issues with onions.
The pungent juice of onions has been used as a moth repellent and can be rubbed on the skin to prevent insect bites.
If boiling water is poured onto chopped onions and left to cool, the resulting liquid can be sprayed onto plants to increase their resistance to pests, and the onion plants when growing are reputed to keep away moles and insects.
Now we are not saying carrying a sack of onions will keep that Flesh form bug spirit off you, but it may give them pause. 
*Translation from clicking-and-clacking*
BUG 1: "Careful guys, it has onions!"
BUG 2: "Ghost, I hate that smell!
BUG 3: "Remember, it can't actually hurt us. Although we might get a little teary-eyed"
BUG 2: "Is it true that those things eat it?"
BUG 1: "EAT IT?! What kind of monstrosity could possibly consume this... THING!"
BUG 3: "Chill out, it's probably just propaganda."