Host search with parent_hostgroup returns all hosts when there are no matches
When searching for parent_hostgroup = "blablabla" where there is no hostgroup named "blablabla", the result includes all hosts. Performing the same search with other criteria like "name" or "comment" instead, the results includes no hosts when there are no matches. This is not necessarily a big deal for GUI searches, but for me it's problematic for API searches.
Fixes #22556 - Correct host search for parent hostgroup
Currently, searching on a non-existant parent fails due to
`hostgroup.subtree_ids` throwing a NoMethodError when no matching
hostgroup is found. This is rescued by scoped search, causing the
search to run with no conditions instead.
for the scoped_search part)