That is exactly the trap. I once left a damp bag under the sink because I thought I would deal with it later and later became a smell. It was a very educational smell, unfortunately. After that I started keeping a little stack of bags in the bin cabinet itself. It sounds obvious now, but obvious is often what we only learn after the mistake