deque: fix bugs in assertion code and move up 3 variables...