Wow dude - that's weird! Is it a steady rhythmic flashing, or somewhat erratic?
Both my sets of ToD problems were due to shorts in the ToD system wiring harness - wear or heat (from the catalytic converter) on the wire insulation caused the sensor wires to short out and led to spastic ToD indicator light behavior.
It might be possible that you are grounding out on a lighting wire, which would explain why it only happens when the lights are on. But that is just a WAG.
Good luck!