Only restart the queue if there are pages to check

There is no need to continually restart the daemon when there is nothing to scan.