when i first got my car, it had an atmo venting bov (a blow off valve that goes psssshhhhht into the air). i had this same type of stall happen to me a few times, randomly, always when coming onto the brakes with clutch in. the more sudden the action, the more likely it was to almost stall, occasionally stalling.
plumbed the bov back in. never had this issue again.
so, if you dont have a blow off valve, forget everything i said. if you do, i would consider this a high priority on your check list.
edit: i just read your original post again, and realised you may have just been idleing at the lights, not coming onto the brakes at all. if so, its prob not the bov.
dont know why i imagined braking lol.