### Summary

For example take this task:
```- name: "include ..."
  include_tasks:
    file: something.yml
    apply:
      #tags: "{{ item.tags }}"
      when: "item.name in ansible_run_tags or item.tags | intersect(ansible_run_tags) | count > 0 or 'all' in ansible_run_tags"
  loop: "{{ cfg.value.data | flatten(levels=1) }}"
  tags:
    - always
```
Here assume the following types for the jinja templates:
item.tags: list
item.name: string
cfg.value.data: object with attributes: name and tags

When ran like this (because of the commented tags) it will work as intended with a little less functionality.
When ran as follows:
```- name: "include ..."
  include_tasks:
    file: something.yml
    apply:
      tags: "{{ item.tags }}"
      #when: "item.name in ansible_run_tags or item.tags | intersect(ansible_run_tags) | count > 0 or 'all' in ansible_run_tags"
  loop: "{{ cfg.value.data | flatten(levels=1) }}"
  tags:
    - always
```
It will error out saying that tags waits a list of class string or class int and got class list.
In normal tasks this issue does not appear, only on include_tasks and on task blocks.

The scenario where this is a drawback:
Assume we want to include generic tasks from a directory. The tasks include other tasks tagged with something. If we use the "when" directive to check tags then we have to add the include task's tag into the attribute list cause if we do not, then the include will not get evaluated which means the tasks won't get included and therefore the subtags will not be part of the playbook and it won't run as expected.

### Issue Type

Bug Report

### Component Name

task.py, block.py

### Ansible Version

```console
$ ansible --version
ansible 2.10.8
  config file = /home/levi/ansible/ansible.cfg
  configured module search path = ['/home/levi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]
```


### 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
ansible-config dump --only-changed
[DEPRECATION WARNING]: ALLOW_WORLD_READABLE_TMPFILES option, moved to a per plugin approach that is more flexible, use mostly the same config will work, but now controlled 
from the plugin itself and not using the general constant. instead. This feature will be removed from ansible-base in version 2.14. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
ALLOW_WORLD_READABLE_TMPFILES(/home/levi/ansible/ansible.cfg) = True
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/levi/ansible/ansible.cfg) = True
DEFAULT_ROLES_PATH(/home/levi/ansible/ansible.cfg) = ['/home/levi/ansible/roles']
DEFAULT_SCP_IF_SSH(/home/levi/ansible/ansible.cfg) = True
DEFAULT_STDOUT_CALLBACK(/home/levi/ansible/ansible.cfg) = yaml
DEFAULT_TIMEOUT(/home/levi/ansible/ansible.cfg) = 40
DISPLAY_SKIPPED_HOSTS(/home/levi/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/home/levi/ansible/ansible.cfg) = False
```


### OS / Environment

ubuntu 20.04
But this issue is really platform independent.

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: "include ..."
  include_tasks:
    file: something.yml
    apply:
      tags: "{{ item.tags }}"
      #when: "item.name in ansible_run_tags or item.tags | intersect(ansible_run_tags) | count > 0 or 'all' in ansible_run_tags"
  loop: "{{ cfg.value.data | flatten(levels=1) }}"
  tags:
    - always
  vars:
    cfg:
      value:
        data:
          - tags:
              - TagA
              - TagB
            name: "something"
```


### Expected Results

Apply the array of tags to the included packages normally.

### Actual Results

```console
Error tags must be a list of (class string or class int) but got class list
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
#
#
#
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat import unittest
from ansible.playbook.taggable import Taggable
from units.mock.loader import DictDataLoader
class TaggableTestObj(Taggable):