Fixes #8551 - use most specific matcher for inherited hostgroups

Host recieves correct smart_class_parameter value when multiple overrides for
inherited host groups exist for parameter.