This is the reason why I carry a backup light. Just a 2xAAA cateye single LED that's really only good for others seeing me, and to see in pitch black conditions (which usually never happens, unless your in a tunnel, cave, or some other place you probably would be better off walking).
I also keep a small amolunt of tape and a 3 LED flashlight around, so even if my backup gets hosed I can just tape the flashlight to my bars...even though my flashlight is mainly to read maps and do bike work...it's a cheapo, so teh LEDs are just bright enough to light things up without glare...perfect for looking at metal objects