An attempt at stopping back currents rather than cleaning up earth connections and lamp holder contacts, take it out and enjoy the light show.It's a live feed to the headlight bulbs. Reads 12v to earth with both dipped and full beam on. If you were looking at the back of the bulb, that wire connects to the right hand terminal.
i had a similar problem caused by a faulty bulb putting dip and main on together
remove one bulb then try it same with the other one