If its just the rear light warning lamps that flicker on and off, or remain on even after you've depressed the brake pedal after starting the car, then another place to look is on the brake pedal itself, there is a switch mounted against the brake pedal up under the drivers footwell, if this has become detached or loose from its push and twist mounting it can cause these problems as well. If the warning unit is flashing door open as well as light faults then its more likely to be the dash unit itself that's faulty rather than door sensors or bulbs, although it has to be said that bad earths on a car can cause very strange electrical gremlins. If it was my car that had these problems , i would try to find a replacement dash warning unit from a local breakers or scrap yard and swap it over, you may find that cures the problem