Must be a ground or connection issue, the igntion and lighting systems are separate from each other. There is two coils in the stator, one runs the ignition, one charges the battery and runs the lights, aka the alternator. So the coil shouldn't have affected it.
I am betting the problem is in your handlebar control and its just a coincidence, the light switch goes intermittent from getting dirty. I would go through all connections and the handlebar controls.
---------------------------------------------------------
1984 Honda ATC200ES "Big Red"
1982 ATC200E "Hondie"
1988 TRX300FW "Project Quad" Still in progress....