Interestingly, I had the same problem start to happen as I was riding last night, and I remembered seeing this thread.
The headlight was running rather dim, and when I turned on the turn signals, or applied the brakes, the headlight would return to full brightness.
When I got the bike back home and started looking at the wiring, I found that the white wire that comes out of the (+) battery cable (and terminates in a double connector, with one wire going to the fusebox, and the other going to the rectifier, I think) had corroded clear through on the end where it attaches to the battery cable. I clipped off the end of the wire where it was corroded, crimped on a loop connector (not sure if that is the proper name for it), and connected the wire to the (+) post of the starter solenoid. Problem solved.