I've found a way to remove most odors from lids; at least every odor I've tried it on. The answer is fat! If an odor isn't removed through washing, it's probably not water soluble. However, lots of things that don't dissolve in water do dissolve in fat. So put some fat (I use lard, but I'm sure other fats would work) in your lid, leave it in a warm spot for a couple of days, then wipe clean and wash. I've had great luck with pickle and salsa lids, so far.
It's also possible that if this doesn't work, the flavors could be alcohol soluble. So try vodka or everclear for really tough ones.