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

an alternative to the `order('match DESC')` in line 39 would be to change this to:
``` ruby
sorted_lookup_values = lookup_values_for_key.sort_by { |lv| [key.path.index(lv.match.split(LookupKey::EQ_DELM).first), -1 * lv.match.split(LookupKey::EQ_DELM).last.length] }
```
since the more specific hostgroup has a longer title it would also work