Make sure we only compare valid results when adding search results.