Fix crash purging closed queue.