Better move the code to create `@failed_versions` into the `Repository` model.