can we use child_ids or descendant_ids   instead?
e.g.
```ruby
conditions << "hosts.hostgroup_id IN (#{(param.hostgroup.descendant_ids << param.reference_id).join(', ')})"
```