Cosmetic
Fixing #654: "deque mutated during iteration"