It looks like leaving a great hall will sometimes make your character appear on the side of the building rather than in front of the door. This can result in getting trapped if there are other buildings close by.
Here is someone trapped between a great hall and a tower: