There are loads of variables they may of resulted in that happening - Your own team shooting you for one!
But if you find yourself grabbing the flag by taking a flank, take the flag back through the opposite flank (not leg it back) then if the opposition are still in you can shoot them in backs rather than getting shot running back as fast as you can.
In woodland dont always asume that if you have the flag you have won the game - it is so different to sup'air. Its all about field craft.