### Summary

When I do {% import %} in some jinja template and that imported template contains errors or raises an exception, it is just ignored. Before 2.13 I saw the error when running the playbook with the exception from the imported template. With 2.13 it is just ignored and everything is green. At least such mistakes are ignored: `{{ _undefined_name }}`, `{{ {}['missing_attribute'] }}`, but division on zero still yields an error: `{{ 0/0 }}`.
I tried different combinations of ansible 2.12 & 2.13 with jinja2 3.0 & 3.1. The problem arises only with ansible 2.13 with both jinja versions.

### Issue Type

Bug Report

### Component Name

jinja2

### Ansible Version

```console
$ ansible --version
ansible [core 2.13.1]
  config file = /home/user/.ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/soft/ansible-test-2.13.1/lib/python3.10/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = ./bin/ansible
  python version = 3.10.5 (main, Jun  8 2022, 02:00:39) [GCC 10.2.1 20201203]
  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
```


### OS / Environment

Void Linux

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
---

- hosts: localhost
  connection: local
  tasks:

  - name: test
    template:
      dest: "test.txt"
      src: test1.j2
```

test1.j2:
```
{% import 'test2.j2' as t %}
```

test2.j2:
```
{{ _error }}
{{ {}["error"] }}
```

### Expected Results

With ansible 2.12 I get an error:
```
TASK [test] ********************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: '_error' is undefined
fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: '_error' is undefined"}
```

### Actual Results

```console
$ ansible-playbook -CD test.yml 
[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 [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [test] ********************************************************************
--- before
+++ after: /home/user/.ansible/tmp/ansible-local-17138l0v8fvxh/tmpla8gx7_o/test1.j2
@@ -0,0 +1 @@
+

changed: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=2    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
AnsibleAssertionError,
    AnsibleError,
    AnsibleFilterError,
    AnsibleLookupError,
    AnsibleOptionsError,
    AnsiblePluginRemovedError,
    AnsibleUndefinedVariable,
)
from ansible.module_utils.six import string_types, text_type
from ansible.module_utils._text import to_native, to_text, to_bytes
from ansible.module_utils.common.collections import is_sequence
from ansible.module_utils.compat.importlib import import_module
from ansible.plugins.loader import filter_loader, lookup_loader, test_loader
from ansible.template.native_helpers import ansible_native_concat, ansible_eval_concat, ansible_concat
from ansible.template.template import AnsibleJ2Template
from ansible.template.vars import AnsibleJ2Vars
from ansible.utils.collection_loader import AnsibleCollectionRef
from ansible.utils.display import Display
from ansible.utils.collection_loader._collection_finder import _get_collection_metadata
from ansible.utils.listify import listify_lookup_plugin_terms
from ansible.utils.native_jinja import NativeJinjaText
from ansible.utils.unsafe_proxy import wrap_var
display = Display()
__all__ = ['Templar', 'generate_ansible_template_vars']
NON_TEMPLATED_TYPES = (bool, Number)
JINJA2_OVERRIDE = '#jinja2:'
JINJA2_BEGIN_TOKENS = frozenset(('variable_begin', 'block_begin', 'comment_begin', 'raw_begin'))
JINJA2_END_TOKENS = frozenset(('variable_end', 'block_end', 'comment_end', 'raw_end'))
RANGE_TYPE = type(range(0))
def generate_ansible_template_vars(path, fullpath=None, dest_path=None):