Was this car in a flood or is there a leak under the dash? Last time I had a car do all that you are describing water had leaked into the relay/fuse panel and played havoc with the lights. Water could have gotten into one of the light units and is feeding power to the center brake light when the headlights are on. I would check the rear brake lights closely for leaks. The front lamps don't share the brake circuit. Break out a meter and check the circuit pathways when the harness is disconnected because your short may be in there. Look for cross connects.