1) Well you know that the computer waits until the speedsensor stops giving a signal, and then once you come to a stop, the ecu runs full idle. So, if your idle is set too low, then when you come to a stop, the ecu will want to idle down and then it could just die out.
2) Also, you could have a bad battery, and when you put the brake lights on at an idle, the alternator has to run most of the power, and it puts a load on the engine and kills it. This happened in my MR2, It would *almost * die when I hit the brakes after driving on the freeway for a while. Then when I would coast to the stop light and hit the brakes while in neutral, the rpm would drop to about 500-600 and almost die, and a couple of times it did die.
I couldn't figure it out, and then one time I built a new battery mount in the front trunk and replaced the battery, then the whole problem went away.
Good Luck