John, try the easy way, before you do anything run an earth from the bulb to a screw holding the headlamp bucket. If nothing else it will eliminate a bad earth. Both my lamps have earth flyleads fitted to earth this way, its easier than trying to trace a bad earth in the loom. A short to earth will usually blow a fuse but a bad earth will not, it just won't work.