Made a change to UniqueQueue to use Queue instead of deque. Removed
the Lock statements in UniqueQueue which somehow makes it work.
Seems dirty.