has the vehicle been in an accident or had any aftermarket elect component added that you know of? i agree with you, o2 sensor probably not, wiring issue more than likely. i doubt
if it's the harness, more like a short somewhere that would effect the pcm thus setting the code. Now, just have to figure
out in addition to the headlight switch being turned on, the short( I assume it's a short) is setting the code by effecting another elect part, like maybe the alternator somehow. i believe that has an internal regular (in the alt.). i wish you luck
on this one my friend, elect problems can be a nightmare as
you know and is why shops charge $100.00 hr. sometimes to
diagnose elect problems. ps: at least when you reset, the light stays off so it's not a hard code, but, that would be easier to diagnose but. probably more expensive to fix.