### Summary

When I try to reference a variable in a handler of an included role B included whitin another role A and the role A is called from my playbook without specifying a value for the variable (hence leaving it set to the default value) Ansible gives me an error saying that the variable is undefined, while it should be set to the default value from role A. This is really difficult to explain, but easy to understand from the example below.

### Issue Type

Bug Report

### Component Name

default variable values handling

### Ansible Version

```console
$ ansible --version
ansible [core 2.14.4]
  config file = None
  configured module search path = ['/home/codespace/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/codespace/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/codespace/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/codespace/.local/bin/ansible
  python version = 3.10.4 (main, Mar 13 2023, 19:44:25) [GCC 9.4.0] (/usr/local/python/3.10.4/bin/python)
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None
```


### OS / Environment

```
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
```

### Steps to Reproduce

File `playbook.yml`:

```yaml
- hosts: localhost
  connection: local
  tasks:
    - ansible.builtin.include_role: { name: ./role01 }
```

File `role01/defaults/main.yml`:

```yaml
myvar01: value-for-myvar01-from-defaults
```

File `role01/tasks/main.yml`:

```yaml
- ansible.builtin.debug:
    msg: myvar01 in role01 tasks is {{ myvar01 }}

- ansible.builtin.include_role: { name: ./role02 }
  vars:
    myvar02: "{{ myvar01 }}"
```

File `role02/defaults/main.yml`:

```yaml
myvar02: value-for-myvar02-from-defaults
```

File `role02/handlers/main.yml`:

```yaml
- name: myhandler01
  ansible.builtin.debug:
    msg: myvar02 in role02 handlers is {{ myvar02 }}
```

File `role02/tasks/main.yml`:

```yaml
- ansible.builtin.debug:
    msg: myvar02 in role02 tasks is {{ myvar02 }}

- ansible.builtin.command:
    cmd: uptime
  changed_when: true
  notify: myhandler01

- name: Force all notified handlers to run at this point
  ansible.builtin.meta: flush_handlers
```

Then run `ansible-playbook playbook.yml` to see the result.

### Expected Results

I expect the value of the variable to be `value-for-myvar01-from-defaults` instead of undefined, like this:

```
$ ansible-playbook playbook.yml 
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Main play] *********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [ansible.builtin.include_role : ./role01] ***************************************************************************************************************************************************************************

TASK [./role01 : ansible.builtin.debug] **********************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "myvar01 in role01 tasks is value-for-myvar01-from-defaults"
}

TASK [ansible.builtin.include_role : ./role02] ***************************************************************************************************************************************************************************

TASK [./role02 : ansible.builtin.debug] **********************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "myvar02 in role02 tasks is value-for-myvar01-from-defaults"
}

TASK [./role02 : ansible.builtin.command] ********************************************************************************************************************************************************************************
changed: [localhost]

TASK [./role02 : Force all notified handlers to run at this point] *******************************************************************************************************************************************************

RUNNING HANDLER [./role02 : myhandler01] *********************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "myvar02 in role02 handlers is value-for-myvar01-from-defaults"
}

PLAY RECAP ***************************************************************************************************************************************************************************************************************
localhost                  : ok=5    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
```

### Actual Results

```console
$ ansible-playbook playbook.yml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Main play] *********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [ansible.builtin.include_role : ./role01] ***************************************************************************************************************************************************************************

TASK [./role01 : ansible.builtin.debug] **********************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "myvar01 in role01 tasks is value-for-myvar01-from-defaults"
}

TASK [ansible.builtin.include_role : ./role02] ***************************************************************************************************************************************************************************

TASK [./role02 : ansible.builtin.debug] **********************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "myvar02 in role02 tasks is value-for-myvar01-from-defaults"
}

TASK [./role02 : ansible.builtin.command] ********************************************************************************************************************************************************************************
changed: [localhost]

TASK [./role02 : Force all notified handlers to run at this point] *******************************************************************************************************************************************************

RUNNING HANDLER [./role02 : myhandler01] *********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ myvar01 }}: 'myvar01' is undefined. 'myvar01' is undefined. {{ myvar01 }}: 'myvar01' is undefined. 'myvar01' is undefined\n\nThe error appears to be in '/workspaces/test-ansible-nested/role02/handlers/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: myhandler01\n  ^ here\n"}

PLAY RECAP ***************************************************************************************************************************************************************************************************************
localhost                  : ok=4    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
```


### Code of Conduct

- [x] I agree to follow the Ansible Code of Conduct
#
#
#
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from os.path import basename
import ansible.constants as C
from ansible.errors import AnsibleParserError
from ansible.playbook.attribute import NonInheritableFieldAttribute
from ansible.playbook.task_include import TaskInclude
from ansible.playbook.role import Role
from ansible.playbook.role.include import RoleInclude
from ansible.utils.display import Display
from ansible.module_utils.six import string_types
from ansible.template import Templar
__all__ = ['IncludeRole']
display = Display()
class IncludeRole(TaskInclude):