Hello sky 34,
Here is a brief description of the circuit operation.Your problem sounds like you either have a bad door jamb switch,headlamp switch(allowing a ground to complete the circuit when in off position),or a pinched wire to the dome,intermittently grounding the circuit.I have found screws into the wiring harness at the sun visors.
Master A.S.E Automotive technician
A.S.E MasterTechnician A1-A8 w/L1,38 years experience General Motors Master Technician