Don't use Deque, and thus become compatible with Java 1.5. This changeset can be reversed once we drop Java 1.5 support.