Fix for the error that the collection reindexing job throws when run on an empty database.