after you pulled the levers on the north wall, and the screen shifted to the door you are referring to, you have to pull the lever on the west wall. That specific lever disarms the trap.
If you don't pull the lever on the west wall, you can use "sneak" with the 2 characters, one after the other. They don't get trapped.