It could be corroded terminals in the socket. Use brash brush to clean good, apply some de-oxidation grease to the lamp and re-install.
Don't go by looks of lamps.
I would think about getting LEDs.
Inspection at CW? yeah right!
Bud
USAF Retired
Pace Arrow
2003 Chev Ice Road Tracker