Counting shards was wrong if one of the indices was in the RED status

Closes #4528
Reverting back to 0.90.7 config/templates loading behaviour

Closes #4511