Queue Search Optimization

When searching the queue, the queue will not be opened on the first
iteration if the queue is already open.