ive seen this and had some ideas so i started up a server and tested a few cases.
In the mode goldcove is where i tested this...
**Die by fire or from drowning and you drop the flag but then seemingly pick it up while youre dead and hence the spawning with the flag.
**Trying to leave the game area with the flag and the subsequent death work correctly and Ive looked at the code and I would guess its something in the way you die from fire/drowning.
Id suggest just dropping the flag somewhere other than exactly on top of the player when they die.
Or not do setElementData( player, "col", nil ) until the player has spawned...that way they cant pick it up after death.