### Summary

In Ansible 2.14.3, e.g. package available in Debian Bullseye, `include_tasks` in a handler within a role always found the task file from `tasks` in that role, if it existed. When I install the current version using pip (2.15.6 at time of writing) this stops working if `tasks/main.yaml` does not exist in the role - creating an empty `main.yaml` (e.g. `touch roles/role_name/tasks/main.yaml`) is sufficient for `import_tasks` in a handler to start working again.

I have manually downgraded to 2.14.3 with pip and verified the same code works with 2.14.3 but not 2.15.6 on the same system, so this is not a difference with the OS package compared to the one pip installs and a bug introduced between those two versions.

In my specific use case, I have a role that is designed to be used via several entry points and has no default `main.yaml`. This has been working fine but started erroring in version 2.15.6. It has taken quite a bit of testing to discover what was making it fail (and why other similar roles for which I used the same pattern but did happen to have a `main.yaml`, were still working).

### Issue Type

Bug Report

### Component Name

ansible.builtin.import_tasks

### Ansible Version

```console
$ # Broken version
$ ansible --version
ansible [core 2.15.6]
  config file = /home/laurence/Projects/ansible-home/ansible.cfg
  configured module search path = ['/home/laurence/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/laurence/venvs/ansible/lib/python3.9/site-packages/ansible
  ansible collection location = /home/laurence/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/laurence/venvs/ansible/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/home/laurence/venvs/ansible/bin/python)
  jinja version = 3.1.2
  libyaml = True
$ # Working version (after "pip install --upgrade ansible-core==2.14.3")
$ ansible --version
ansible [core 2.14.3]
  config file = /home/laurence/Projects/ansible-home/ansible.cfg
  configured module search path = ['/home/laurence/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/laurence/venvs/ansible/lib/python3.9/site-packages/ansible
  ansible collection location = /home/laurence/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/laurence/venvs/ansible/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/home/laurence/venvs/ansible/bin/python)
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None
```


### OS / Environment

Debian 12.0

Ansible installed in Python 3 VirtualEnv with this `requirements.txt` however should be reproducible with just `ansible-core`:

```
ansible-core
# dnspython is required for community.general.dig lookup plugin
dnspython
# hvac required for Hashicorp Vault
hvac
# netaddr required for ansible.utils.ipaddr filter
netaddr
# To manage Windows systems
pywinrm[credssp]
```

### Steps to Reproduce

`site.yaml`:

```yaml
---
- name: Test
  hosts: all
  gather_facts: false  # Not needed for example
  tasks:
    - ansible.builtin.import_role:
        name: test_role
        # Custom entry point (no main.yaml required in test_role/tasks)
        tasks_from: entry_point.yaml
...
```

`roles/test_role/tasks/entry_point.yaml`:

```yaml
---
# This is not necessary to reproduce the problem, just
# illustrating include_tasks works here without `main.yaml`.
- name: Include tasks works here
  ansible.builtin.include_tasks: included_tasks.yaml
# Somehow trigger the role's handler - how is not important,
# but running the handler is necessary to illustrate the problem.
- name: Trigger handler
  ansible.builtin.debug:
  changed_when: true  # Force handler to always be notified
  notify: Test handler
...
```

`roles/test_role/tasks/included_tasks.yaml`:

```yaml
---
- name: Included task
  ansible.builtin.debug: msg="Included task"
...
```

`roles/test_role/handlers/main.yaml`:

```yaml
---
- name: Test handler
  ansible.builtin.include_tasks: included_tasks.yaml
...
```


### Expected Results

When handler runs, `included_tasks` file is found in role's `tasks` folder (expected behaviour can be seen by running with Ansible 2.14.3 or if empty `main.yaml` has been added to `test_role/tasks`):

```
$ ansible-playbook -i localhost, site.yaml 

PLAY [Test] ********************************************************************************************************************************************************************************************************************

TASK [test_role : Include tasks works here] ************************************************************************************************************************************************************************************
included: /tmp/test/roles/test_role/tasks/included_tasks.yaml for localhost

TASK [test_role : Included task] ***********************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "Included task"
}

TASK [test_role : Trigger handler] *********************************************************************************************************************************************************************************************
changed: [localhost] => {
    "msg": "Hello world!"
}

RUNNING HANDLER [test_role : Test handler] *************************************************************************************************************************************************************************************
included: /tmp/test/roles/test_role/tasks/included_tasks.yaml for localhost

RUNNING HANDLER [test_role : Included task] ************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "Included task"
}

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

```



### Actual Results

```console
With Ansible 2.15.6, error that `included_tasks.yaml` does not exist - in this example, despite it being included successfully in another task list. It is unexpected that `include_tasks`, even when used from a handler, cannot find a tasks file in the the role's `tasks` directory (i.e. where all of a role's tasks live). This used to work fine (and still does if downgrade `ansible-core` to previous version):


$ ansible-playbook -i localhost, site.yaml                                   
                                                        
PLAY [Test] ********************************************************************************************************************************************************************************************************************
                                                                                                                                                                                                                                
TASK [test_role : Include tasks works here] ************************************************************************************************************************************************************************************
included: /tmp/test/roles/test_role/tasks/included_tasks.yaml for localhost
                                                                                                                
TASK [test_role : Included task] ***********************************************************************************************************************************************************************************************
ok: [localhost] => {                                
    "msg": "Included task"
}           
                                                        
TASK [test_role : Trigger handler] *********************************************************************************************************************************************************************************************
changed: [localhost] => {
    "msg": "Hello world!"         
}                      
                                                        
RUNNING HANDLER [test_role : Test handler] *************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"reason": "Could not find or access '/tmp/test/included_tasks.yaml' on the Ansible Controller."}
                                                        
PLAY RECAP *********************************************************************************************************************************************************************************************************************
localhost                  : ok=3    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

```

Note that creating `roles/test_role/main.yaml` causes the same code to begin working with 2.15.6 as well as 2.14.3. Although `main.yaml` is the default entry point, I am not aware of any other Ansible functionality that breaks if it does not exist and only other entry points are used for a specific role, so I think this is a bug.

```
$ touch roles/test_role/tasks/main.yaml
$ ansible-playbook -i localhost, site.yaml   
                                                        
PLAY [Test] ********************************************************************************************************************************************************************************************************************
                                                        
TASK [test_role : Include tasks works here] ************************************************************************************************************************************************************************************
included: /tmp/test/roles/test_role/tasks/included_tasks.yaml for localhost
                                                        
TASK [test_role : Included task] ***********************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "Included task"                                                                                      
}  
                                                        
TASK [test_role : Trigger handler] *********************************************************************************************************************************************************************************************
changed: [localhost] => {
    "msg": "Hello world!"                                                                                       
}  
                                                        
RUNNING HANDLER [test_role : Test handler] *************************************************************************************************************************************************************************************
included: /tmp/test/roles/test_role/tasks/included_tasks.yaml for localhost
                                                        
RUNNING HANDLER [test_role : Included task] ************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "Included task"
}

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

```
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
def __init__(self, filename, args, vars, task, is_role=False):
        self._filename = filename
        self._args = args
        self._vars = vars
        self._task = task
        self._hosts = []
        self._is_role = is_role
        self._results = []
    def add_host(self, host):
        if host not in self._hosts:
            self._hosts.append(host)
            return
        raise ValueError()
    def __eq__(self, other):