fixes #5848 - Can't search for host with class inherited from config group

@domcleal, yes, your hunch is correct. Thanks!