Electrical Gremlins....

I've found the little metal crimps inside the harness will fail where a wire will "Y" off. They'll look absolutely fine on the outside, nice, clean and tight, no corrosion or other mechanical defect but it will still fail to make good electrical contact. Bend the harness 10 degrees one way it's fine, 10 the other and no go.. A test light where the power is supposed to be (your case, the ignition power lead or power to the RH handle bar switch) and run up and down harness bending it and moving the handlebars until you can pin down the general area. Once you have a good idea where the issue is, slit the harness and remove the offending crimp, Solder and shrink wrap the wire.

I had one last year that took over an hour to find, but I did find the little bastard causing the issue. In my case it was a "Y" crimp in the harness for the power to the RH switch in the general vicinity of the steering head. The dead giveaway was the headlight would go off as well as the ignition. On the 70's jap bikes, the power for the headlight still went up to the RH switch even though there was no on/off switch anymore (as mandated by the DOT). It was a "vestigal" connection that was really no longer needed, like an appendix. The starter still worked though as the japanese are big on "grounding" with switches, rather than applying power, so that was a seperate circuit.