Optimizing groups_for_host() lookup in inventory