Exactly because of issues like this I added a dedicated ground to every rear light socket on the car. (not the housing, but the bulb socket itself)
Even the contact between the bulb socket and housing metals give up sometimes, and this is one of the reasons the ground wire touching socket bases works really well to pinpoint light grounding problems.