Fix filtering of processed task

Still working on shared tests between memory and persisted queues. Meanwhile I want this to work!