Sometimes it will put you back at the waypoint/TOWN even though you died in the dungeon, just happened YET again in Leoric Cathedral.