That's a puzzle, you need to go in certain order like in Super Mario. But you should be able to leave that corridor if you want to get some of the previous loots, I'll fix it in a patch.