Patrick, there is usually provision to run an earth from the bulb holder to shell by means of the small metal loops to push a bullet connector in...So it's not a bodge.
Have you got the four position WD switch or a civy three position type? Either way if wired correctly the pilot bulb should go out when the headlamp is on. Perhaps your switch hasn't got the winged brass flaps needed to overcome the tail light and pilot light issue.
There is a wiring diagram on the technical page. Ron
I have the WD switch, but cannot find a position where the pilot light goes out.
I am not good at electrics, but find wiring diagrams particularly confusing. It doesn't help as my electrics are positive earth and the wiring diagrams I seem to find are negative earth.
OK Patrick, I'll try and help. Firstly, it makes no difference to the wiring if your bike is Pos or Neg earth. Although they were built Neg earth and you can easily change it and we can discuss that later if you want.
Your switch should look like this (With the brass wings) and I have blown up the switch diagram to make it easier to follow.
Your pilot bulb should connect to terminal 4 and you should have the short loop wire between terminals 3 and 7. It's this loop wire and the action of the wings that switches your pilot light off but leaves your tail light on (Terminal 1).
The only difference to this digram concerns if you have a twin filament headlamp bulb with a dip switch. Then the cable from terminal 2 goes to your dip switch and the other two wires from your dip switch go back to your bulb. Ron