Fix inverted queue asserts

Fix inverted queue asserts introduced in b378ed5692.
Merge pull request #172 from andrewtj/atj-fix-inverted-queue-asserts

Fix inverted queue asserts