### Summary

Different ansible versions have different 'set_fact' behaviors.

### Issue Type

Bug Report

### Component Name

set_fact

### Ansible Version

```console
## Newest version on fedora 34
$ ansible --version
ansible [core 2.12.1]
  config file = None
  configured module search path = ['/home/plewyllie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/plewyllie/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/plewyllie/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/plewyllie/.local/bin/ansible
  python version = 3.9.9 (main, Nov 19 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
  jinja version = 2.11.3
  libyaml = True

## Working version (on mac os x)
ansible [core 2.11.6]
  config file = None
  configured module search path = ['/Users/plewyllie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/4.8.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/plewyllie/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.2
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
```


### OS / Environment

Fedora. I used Mac OS X to confirm the 'older' behavior to avoid a downgrade process. However, the previous version that I had on Fedora was working in the same way, it's updating ansible that has caused this issue to appear.

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
### Test Playbook
```
---
## Naming VMs for OCP
## Each VM going through this list should have the new fact "vm_name" set to "cluster_name"-"initial_vm_name"
- hosts: localhost
  gather_facts: no
  tasks:
  - set_fact:
      vm_name : "{{ cluster_name }}-{{ hostvars[item].inventory_hostname }}"
    delegate_to: "{{ item }}"
    delegate_facts: True
    with_items: "{{ groups['vms'] }}"

  - debug:
      msg: "{{ item }} vm_name  {{ hostvars[item].vm_name }}"
    with_items: "{{ groups['vms'] }}"
```

### Test inventory
```
[vms]
install
lb

[all:vars]
cluster_name=ocp4-pieter
```

### Expected Results


With ansible [core 2.11.6] the output will be:
```
TASK [debug] *************************************************************************************************************
ok: [localhost] => (item=install) => {
    "msg": "install vm_name  ocp4-pieter-install"
}
ok: [localhost] => (item=lb) => {
    "msg": "lb vm_name  ocp4-pieter-lb"
}
```

With the newer ansible [core 2.12.1] the output looks like this:
```
TASK [debug] *************************************************************************************************************************
ok: [localhost] => (item=install) => {
    "msg": "install vm_name  ocp4-pieter-lb"
}
ok: [localhost] => (item=lb) => {
    "msg": "lb vm_name  ocp4-pieter-lb"
}
```

I have also tried with the development branch:
```
(venv) [plewyllie@fedoravm ansible-issue]$ ansible --version
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are
modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can
become unstable at any point.
ansible [core 2.13.0.dev0] (devel b984dd9c59) last updated 2022/01/07 16:00:28 (GMT +200)
  config file = None
  configured module search path = ['/home/plewyllie/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/plewyllie/ansible-dev/ansible/lib/ansible
  ansible collection location = /home/plewyllie/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/plewyllie/ansible-dev/ansible/bin/ansible
  python version = 3.9.9 (main, Nov 19 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
  jinja version = 3.0.3
  libyaml = True
(venv) [plewyllie@fedoravm ansible-issue]$ ansible-playbook -i inventory main.yml
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are
modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can
become unstable at any point.

PLAY [localhost] *********************************************************************************************************

TASK [ansible.builtin.set_fact] ******************************************************************************************
ok: [localhost -> install] => (item=install)
ok: [localhost -> lb] => (item=lb)

TASK [debug] *************************************************************************************************************
ok: [localhost] => (item=install) => {
    "msg": "install vm_name  ocp4-pieter-lb"
}
ok: [localhost] => (item=lb) => {
    "msg": "lb vm_name  ocp4-pieter-lb"
}

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

### Actual Results

```console
TASK [debug] *************************************************************************************************************************
ok: [localhost] => (item=install) => {
    "msg": "install vm_name  ocp4-pieter-lb"
}
ok: [localhost] => (item=lb) => {
    "msg": "lb vm_name  ocp4-pieter-lb"
}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
if self._task.register:
                vars_copy[self._task.register] = result
            
            
            if 'skipped' not in result:
                try:
                    condname = 'changed'
                    _evaluate_changed_when_result(result)
                    condname = 'failed'
                    _evaluate_failed_when_result(result)
                except AnsibleError as e:
                    result['failed'] = True
                    result['%s_when_result' % condname] = to_text(e)
            if retries > 1:
                cond = Conditional(loader=self._loader)
                cond.when = self._task.until
                if cond.evaluate_conditional(templar, vars_copy):
                    break
                else:
                    
                    if attempt < retries:
                        result['_ansible_retry'] = True
                        result['retries'] = retries
                        display.debug('Retrying task, attempt %d of %d' % (attempt, retries))
                        self._final_q.send_callback(
                            'v2_runner_retry',