Fixes #5723 - Show hostgroups inherited via config groups in puppetclass

I would use `where` because using `find` with an array can cause an error when one of the id's is missing:
`ActiveRecord::RecordNotFound: Couldn't find all Hostgroups with IDs (943, 7, 35, 29, 1) (found 4 results, but was looking for 5)`