Fix: Host groups in objects.cache aren't working properly.

Fixes #5632