Revert "Don't store failed tasks in the index."

This reverts commit 5b2eb71f0de1b40306a5655a26cf833868b50eaf.