Okay, that narrows it down. I forgot to add a failsafe for bandits catching up to you for if you try to go for the entrance. In the process of fixing that now, and I should have a patch out later this afternoon.
Yeah, I suspected that was the case. I just released a patch that adds zones that NPCs are not allowed to enter, which should prevent this from happening again.