Fixes #8551 - host recieves correct smart_class_parameter value when multiple overrides in inherited Host Groups exist for parameter

each with index is a bit slower, have a look at
https://github.com/JuanitoFatas/fast-ruby