Removing a file from the queue caused assert failure in some cases.