I wish I knew the definitive answer.

My suspicion is that proximity to metal won't hurt it. It is proximity to magnetic fields (from a magnet or other strong magnetic fields) that can hurt it.

I found this statement from Silva (the real one from Sweden, not the U.S. one):

"Never expose compasses to extreme temperatures (above + 60°C or below -40°C), or to magnetic fields such as knives, radio speakers, magnets etc. Such exposure can cause permanent damage to them."

Knives???

I found this http://www.zoom-one.com/navigati.htm

It says to avoid speakers, computers, and other electrical or electronic devices. It also says "Storing a compass in a hot car can also damage it because the liquid inside may expand, thus rupturing the seal and start leaking" and "If you want a compass to store in a car, you should get one that is designed to take very warm storage temperatures, or not use a damping liquid inside."