That's why it's good to know how to tell the approximate direction without a compass. If you have a pretty good idea of your approximate direction by natural means (like checking position of the sun), you'll notice right away if your compass is doing something funny.

I've been told that the same problem--rocks with their own magnetism--can happen in the Pueblo Mountains of SE Oregon, where there is no constructed trail. Navigation is between widely-spaced cairns found by compass bearings. It's strongly suggested that you spot the next cairn visually rather than trusting entirely to your compass.
_________________________
May your trails be crooked, winding, lonesome, dangerous, leading to the most amazing view--E. Abbey