You said light socket, but you need to ground the bulb base and try it.
The sockets can loose their ground to the housing.
Tail lights working doesn't necessarily tell you for sure that the brake light is getting the ground it needs.
Some the sockets are so sketchy about grounds that I even solder a ground right to the bulb base itself.