### Summary

Ansible is attempting to jinja template the return from a lookup if something in the lookup is a variable itself. But if nothing in the lookup is a template it's fine with not jinja templating the result of the lookup.

Do you have an explanation for the below-described behavior?

### Issue Type

Bug Report

### Component Name

lookup

### Ansible Version

```console
$ ansible --version
ansible [core 2.12.4]
  config file = /home/myuser/.ansible.cfg
  configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/devenv-5/lib/python3.9/site-packages/ansible
  ansible collection location = /home/myuser/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/devenv-5/bin/ansible
  python version = 3.9.12 (main, Mar 25 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
  jinja version = 2.11.3
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
DEFAULT_LOG_PATH(/home/myuser/.ansible.cfg) = /home/myuser/ansible.log
DEFAULT_STDOUT_CALLBACK(/home/myuser/.ansible.cfg) = yaml
RETRY_FILES_ENABLED(/home/myuser/.ansible.cfg) = False
```


### OS / Environment

Fedora 35

### Steps to Reproduce

 I was able to replicate this with the following playbook:
<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
---
- name: Test some kind of weird lookup thing
  hosts: localhost
  gather_facts: False
  vars:
    file_name: "lookup_test.yml.txt" #"{{ my_file }}"
  tasks:
    - name: Get file content
      set_fact:
        file_content: "{{ lookup('file', file_name) }}"

    - name: Print content
      debug:
        msg: "{{ content }}"
      vars:
        content: "{{ file_content }}"
```

Where lookup_test.yml.txt file was:
```
some_content: "---\nusername: \"{{ foobar }}\""
```

And I get the same results you saw where, if I hard code the file name in the playbook, it works fine:
```
$ ansible-playbook lookup_test.yml -e my_file=lookup_test.yml.txt 
[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 [Test some kind of weird lookup thing] *********************************************************************************************************

TASK [Get file content] *****************************************************************************************************************************
ok: [localhost]

TASK [Print content] ********************************************************************************************************************************
ok: [localhost] => {
    "msg": "some_content: \"---\\nusername: \\\"{{ foobar }}\\\"\""
}

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

But if I remove the hard coded file name and make it a variable by changing the line:
```
file_name: "lookup_test.yml.txt" #"{{ my_file }}"
```
to
```
file_name: "{{ my_file }}"
```

It now fails:
```
$ ansible-playbook lookup_test.yml -e my_file=lookup_test.yml.txt 
[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 [Test some kind of weird lookup thing] *********************************************************************************************************

TASK [Get file content] *****************************************************************************************************************************
ok: [localhost]

TASK [Print content] ********************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ file_content }}: some_content: \"---\\nusername: \\\"{{ foobar }}\\\"\": 'foobar' is undefined\n\nThe error appears to be in '/Users/my_user/test/lookup_test.yml': line 12, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Print content\n      ^ here\n"}

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


### Expected Results

The file's content shout be printed as:
```
"some_content: \"---\\nusername: \\\"{{ foobar }}\\\"\""
```

### Actual Results

```console
FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ file_content }}: some_content: \"---\\nusername: \\\"{{ foobar }}\\\"\": 'foobar' is undefined\n\nThe error appears to be in '/Users/my_user/test/lookup_test.yml': line 12, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Print content\n      ^ here\n"}
```
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
'''
        Return jinja2 extensions to load.
        If some extensions are set via jinja_extensions in ansible.cfg, we try
        to load them with the jinja environment.
        '''
        jinja_exts = []
        if C.DEFAULT_JINJA2_EXTENSIONS:
            
            
            jinja_exts = C.DEFAULT_JINJA2_EXTENSIONS.replace(" ", "").split(',')
        return jinja_exts
    @property
    def available_variables(self):
        return self._available_variables
    @available_variables.setter
    def available_variables(self, variables):
        '''
        Sets the list of template variables this Templar instance will use
        to template things, so we don't have to pass them around between
        internal methods. We also clear the template cache here, as the variables
        are being changed.
        '''
        if not isinstance(variables, Mapping):
            raise AnsibleAssertionError("the type of 'variables' should be a Mapping but was a %s" % (type(variables)))
        self._available_variables = variables
        self._cached_result = {}
    @contextmanager
    def set_temporary_context(self, **kwargs):