Fix bug with deleting tasks from the search index.