There is some weirdness with the 400F, on models intended for some countries (ie USA) without an on/off switch. There are 2 wires in the cable to the (on-off switch-less) handgrip switchgear. They are different colours, black and something else - brown and a stripe IIRC, and they are just spliced together in the harness (in some countries the headlight on-off switch would connect them). SO.. if you pull on either wire, the spliced pair falls out of the sleeving. And if you get a replacement switch set that looks and works the same from some other bike, it won't have the spliced wires. Either way, unless you jumper those wires at the under-tank connection ratsnest you get no headlight power.
The Honda shop manual wiring diagram shows this exactly. Haynes and Chilton wiring diagrams leave out some interesting details.