### Summary

When handlers are run from within a block using `meta: flush_handlers` in the block, then tasks in the `rescue:` and `always:` sections are not executed.

If the block has a `rescue:` section then the failure of a handler triggered in the block will cause the host to be rescued, but the rescue task is not actually executed.

Whether the handlers are defined somewhere else in the play (outside of the block) or defined from within a role that was included in the block does not influence the behavior.

This was first noticed in Ansible 2.15.0.
In previous Ansible versions 2.12.5 and 2.9.10 this functions as expected.
The new behavior is possibly related to the changes introduced to address the following issues:
- #65067
- #52561

### Issue Type

Bug Report

### Component Name

blocks

### Ansible Version

```console
$ ansible --version
ansible [core 2.15.3]
  config file = /home/user/git/ansible-galaxy/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/venv_3.9/lib/python3.9/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/user/venv_3.9/bin/ansible
  python version = 3.9.5 (default, Nov 23 2021, 15:27:38) [GCC 9.3.0] (/home/user/venv_3.9/bin/python3.9)
  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
ANSIBLE_NOCOWS(/home/user/git/ansible-galaxy/ansible.cfg) = True
CACHE_PLUGIN(/home/user/git/ansible-galaxy/ansible.cfg) = memory
COLOR_CHANGED(/home/user/git/ansible-galaxy/ansible.cfg) = yellow
COLOR_DEBUG(/home/user/git/ansible-galaxy/ansible.cfg) = dark gray
COLOR_DEPRECATE(/home/user/git/ansible-galaxy/ansible.cfg) = purple
COLOR_DIFF_ADD(/home/user/git/ansible-galaxy/ansible.cfg) = green
COLOR_DIFF_LINES(/home/user/git/ansible-galaxy/ansible.cfg) = cyan
COLOR_DIFF_REMOVE(/home/user/git/ansible-galaxy/ansible.cfg) = red
COLOR_ERROR(/home/user/git/ansible-galaxy/ansible.cfg) = red
COLOR_HIGHLIGHT(/home/user/git/ansible-galaxy/ansible.cfg) = white
COLOR_OK(/home/user/git/ansible-galaxy/ansible.cfg) = green
COLOR_SKIP(/home/user/git/ansible-galaxy/ansible.cfg) = cyan
COLOR_UNREACHABLE(/home/user/git/ansible-galaxy/ansible.cfg) = red
COLOR_VERBOSE(/home/user/git/ansible-galaxy/ansible.cfg) = blue
COLOR_WARN(/home/user/git/ansible-galaxy/ansible.cfg) = bright purple
CONFIG_FILE() = /home/user/git/ansible-galaxy/ansible.cfg
DEFAULT_ASK_PASS(/home/user/git/ansible-galaxy/ansible.cfg) = False
DEFAULT_BECOME(/home/user/git/ansible-galaxy/ansible.cfg) = True
DEFAULT_BECOME_ASK_PASS(/home/user/git/ansible-galaxy/ansible.cfg) = False
DEFAULT_BECOME_METHOD(/home/user/git/ansible-galaxy/ansible.cfg) = 'sudo'
DEFAULT_BECOME_USER(/home/user/git/ansible-galaxy/ansible.cfg) = 'root'
DEFAULT_FORCE_HANDLERS(/home/user/git/ansible-galaxy/ansible.cfg) = True
DEFAULT_FORKS(/home/user/git/ansible-galaxy/ansible.cfg) = 40
DEFAULT_GATHERING(/home/user/git/ansible-galaxy/ansible.cfg) = implicit
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/user/git/ansible-galaxy/ansible.cfg) = False
DEFAULT_MANAGED_STR(/home/user/git/ansible-galaxy/ansible.cfg) = %Y-%m-%d %H:%M
DEFAULT_MODULE_COMPRESSION(/home/user/git/ansible-galaxy/ansible.cfg) = 'ZIP_DEFLATED'
DEFAULT_MODULE_NAME(/home/user/git/ansible-galaxy/ansible.cfg) = command
DEFAULT_POLL_INTERVAL(/home/user/git/ansible-galaxy/ansible.cfg) = 15
DEFAULT_REMOTE_PORT(/home/user/git/ansible-galaxy/ansible.cfg) = 22
DEFAULT_REMOTE_USER(/home/user/git/ansible-galaxy/ansible.cfg) = user
DEFAULT_ROLES_PATH(/home/user/git/ansible-galaxy/ansible.cfg) = ['/home/user/git/ansible-galaxy/roles', '/home/user/git/ansible-galaxy/galaxy']
DEFAULT_TIMEOUT(/home/user/git/ansible-galaxy/ansible.cfg) = 20
DEFAULT_TRANSPORT(/home/user/git/ansible-galaxy/ansible.cfg) = smart
DEPRECATION_WARNINGS(/home/user/git/ansible-galaxy/ansible.cfg) = True
EDITOR(env: EDITOR) = vim
HOST_KEY_CHECKING(/home/user/git/ansible-galaxy/ansible.cfg) = False
MAX_FILE_SIZE_FOR_DIFF(/home/user/git/ansible-galaxy/ansible.cfg) = 1048576
RETRY_FILES_ENABLED(/home/user/git/ansible-galaxy/ansible.cfg) = False
SHOW_CUSTOM_STATS(/home/user/git/ansible-galaxy/ansible.cfg) = True
SYSTEM_WARNINGS(/home/user/git/ansible-galaxy/ansible.cfg) = True

BECOME:
======

runas:
_____
become_user(/home/user/git/ansible-galaxy/ansible.cfg) = 'root'

su:
__
become_user(/home/user/git/ansible-galaxy/ansible.cfg) = 'root'

sudo:
____
become_user(/home/user/git/ansible-galaxy/ansible.cfg) = 'root'

CALLBACK:
========

default:
_______
show_custom_stats(/home/user/git/ansible-galaxy/ansible.cfg) = True

CONNECTION:
==========

paramiko_ssh:
____________
host_key_checking(/home/user/git/ansible-galaxy/ansible.cfg) = False
port(/home/user/git/ansible-galaxy/ansible.cfg) = 22
pty(/home/user/git/ansible-galaxy/ansible.cfg) = False
remote_user(/home/user/git/ansible-galaxy/ansible.cfg) = user
ssh_args(/home/user/git/ansible-galaxy/ansible.cfg) = -o PasswordAuthentication=no -o ControlMaster=auto -o ControlPersist=60s
timeout(/home/user/git/ansible-galaxy/ansible.cfg) = 20

ssh:
___
control_path(/home/user/git/ansible-galaxy/ansible.cfg) = %(directory)s/ansi-%%h-%%p-%%r
host_key_checking(/home/user/git/ansible-galaxy/ansible.cfg) = False
pipelining(/home/user/git/ansible-galaxy/ansible.cfg) = True
port(/home/user/git/ansible-galaxy/ansible.cfg) = 22
remote_user(/home/user/git/ansible-galaxy/ansible.cfg) = user
scp_if_ssh(/home/user/git/ansible-galaxy/ansible.cfg) = False
sftp_batch_mode(/home/user/git/ansible-galaxy/ansible.cfg) = False
ssh_args(/home/user/git/ansible-galaxy/ansible.cfg) = -o PasswordAuthentication=no -o ControlMaster=auto -o ControlPersist=60s
timeout(/home/user/git/ansible-galaxy/ansible.cfg) = 20

SHELL:
=====

sh:
__
remote_tmp(/home/user/git/ansible-galaxy/ansible.cfg) = $HOME/.ansible/tmp
world_readable_temp(/home/user/git/ansible-galaxy/ansible.cfg) = False
```


### OS / Environment

RHEL7/8/9

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Demo handler in block rescue/always error
  become: false
  gather_facts: false
  hosts: all

  tasks:
    - block:
        - name: Block debug
          debug:
            msg: "debug 1 - notify handler in block"
          changed_when: True
          notify: Handler

        - meta: flush_handlers

      rescue:
        - name: Rescue debug
          debug:
            msg: "debug 2 - rescue failed hosts"

      always:
        - name: Always debug
          debug:
            msg: "debug 3 - run on all hosts"

  handlers:
    - name: Handler
      fail:
      when: inventory_hostname == 'host1'
```


### Expected Results

The handler triggered in the block should fail on host1.
The rescue task should run on host1 and the host should be marked as rescued instead of failed.
The always task should run on all hosts (also on the failed host1).

```console
# Ansible 2.12.5
$ ansible-playbook test.yml -i inventory.yml -l host1,host2 -D
PLAY [Demo handler in block rescue/always error] ******************************************************

TASK [Block debug] ************************************************************************************
changed: [host1] => {
    "msg": "debug 1 - notify handler in block"
}
changed: [host2] => {
    "msg": "debug 1 - notify handler in block"
}

TASK [meta] *******************************************************************************************

RUNNING HANDLER [Handler] *****************************************************************************
fatal: [host1]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}
skipping: [host2]

TASK [Rescue debug] ***********************************************************************************
ok: [host1] => {
    "msg": "debug 2 - rescue failed hosts"
}

TASK [Always debug] ***********************************************************************************
ok: [host1] => {
    "msg": "debug 3 - run on all hosts"
}
ok: [host2] => {
    "msg": "debug 3 - run on all hosts"
}

PLAY RECAP ********************************************************************************************
host1                      : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=1    ignored=0
host2                      : ok=2    changed=1    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0
```

### Actual Results

```console
# Ansible 2.15.3
$ ansible-playbook test.yml -i inventory.yml -l host1,host2 -D

PLAY [Demo handler in block rescue/always error] ******************************************************

TASK [Block debug] ************************************************************************************
changed: [host1] => {
    "msg": "debug 1 - notify handler in block"
}
changed: [host2] => {
    "msg": "debug 1 - notify handler in block"
}

TASK [meta] *******************************************************************************************

TASK [meta] *******************************************************************************************

RUNNING HANDLER [Handler] *****************************************************************************
fatal: [host1]: FAILED! => {"changed": false, "msg": "Failed as requested from task"}
skipping: [host2]

TASK [Always debug] ***********************************************************************************
ok: [host2] => {
    "msg": "debug 3 - run on all hosts"
}

PLAY RECAP ********************************************************************************************
host1                      : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=1    ignored=0
host2                      : ok=2    changed=1    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
return "HostState(%r)" % self._blocks
    def __str__(self):
        return ("HOST STATE: block=%d, task=%d, rescue=%d, always=%d, handlers=%d, run_state=%s, fail_state=%s, "
                "pre_flushing_run_state=%s, update_handlers=%s, pending_setup=%s, "
                "tasks child state? (%s), rescue child state? (%s), always child state? (%s), "
                "did rescue? %s, did start at task? %s" % (
                    self.cur_block,
                    self.cur_regular_task,
                    self.cur_rescue_task,
                    self.cur_always_task,
                    self.cur_handlers_task,
                    self.run_state,
                    self.fail_state,
                    self.pre_flushing_run_state,
                    self.update_handlers,
                    self.pending_setup,
                    self.tasks_child_state,
                    self.rescue_child_state,
                    self.always_child_state,
                    self.did_rescue,
                    self.did_start_at_task,
                ))
    def __eq__(self, other):