I put the nylon (strechy) bag on first - I tie the top tight like I do tennis shoes with the ends pushed through about the middle of the hair at the top and then put the waterproof nylon over that. I bag tails every winter and don't have any issues with mine coming out unless I braid too far down and the elastic hairband slides off. I usually rebraid and bag at least once a month just to clean up the braid and resection the hair a little. I always have good luck with growth over the winter too.
I braid the whole tail first and then put the bag on (I use the stretchy kind). I tie it within the braid just below the tail bone. Haven't had many fall off using this method (put straps in between braid, tie and then wrap around whole braid and tie again). Hope that makes sense!