Yes, you forfeit your place, unless you dash back into it, although you could look like a douche doing it. Mannerly thing on other people's part would be to allow you to politely cut back in.
If it's a double door, I'll usually hold the the second door open, they deal with the first, unless they are dealing with a tough job then I'll try to do both.
Distance? Usually if I'm close enough to make out a face, I'll let them in, otherwise, I'm going about my business.