Ref T12450. The way that config repair and setup issues interact is kind of complicated, and if cluster.search is invalid we may end up using cluster.search before we repair it.
I poked at things for a bit but wasn't confident I could get it to consistently repair before we use it without doing a big messy change.
The only thing that really matters is whether "type" is valid or not, so just put a slightly softer/more-tailored check in for that.