text: Title: Root with undefined variable in host_group_vars
  Body: ### Summary
  
  Variable `key` may be undefined when cache is falsy at https://github.com/ansible/ansible/blob/12abfb06c21799cfc109db2eb520693071c82c1b/lib/ansible/plugins/vars/host_group_vars.py#L140
  
  Alternatively it may have value from previous entity.
  
  ### Issue Type
  
  Bug Report
  
  ### Component Name
  
  host_group_vars
  
  ### Ansible Version
  
  ```console
  2.18
  ```
  
  
  ### Configuration
  
  ```console
  default
  ```
  
  
  ### OS / Environment
  
  Any
  
  ### Steps to Reproduce
  
  I don't have an example
  
  ### Expected Results
  
  I don't have an example
  
  ### Actual Results
  
  ```console
  I don't have an example
  ```
  
  
  ### Code of Conduct
  
  - [X] I agree to follow the Ansible Code of Conduct