Note that two pieces of metal, particularly but not necessarily steel, that have been securely riveted together for decades will not necessarily maintain electrical conductivity. That is, every riveted joint, like those in lamp sockets and ignition points and sheet metal fenders must come under suspicion. It's common, for example, to rivet a ground wire to a fender. The joint between wire and fender can corrode and thus open, electrically. In addition, so can every joint, bolted or riveted, between the fender and the ground connection on the lighting coil. Even worse, they can be intermittently open: sometimes they'll work, sometimes not.
The only sure cure is to run a ground wire from the lamp socket back to the magneto. But you can clean and re-rivet questionable joints and that should work, too. This is an excellent application for one of the WD-40-type spray lubricants. My favorite family of these is PB Blaster. Their penetrant stuff is quite aggressive, and I've had good luck with their multi-purpose lubricant.