### Summary

When referencing to the test `==`, ansible-core crashes with a very unhelpful error:
```
An exception occurred during task execution. To see the full traceback, use -vvv. The error was:   line 0
```
Passing `-vvv` gives a better hint: `KeyError: 'invalid plugin name: ansible.builtin.=='`. (See below for the full stacktrace.)

git bisect exposed 4260b71cc77b7a44e061668d0d408d847f550156 as the culprit.

### Issue Type

Bug Report

### Component Name

filter/test plugin loading

### Ansible Version

```console
devel
```


### Configuration

```console
-
```


### OS / Environment

-

### Steps to Reproduce

```
ansible -vvv localhost -m debug -a 'msg={{ [1] | selectattr("failed", "==", true) }}'
```

### Expected Results

Some error like
```
localhost | FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: 'int object' has no attribute 'failed'. 'int object' has no attribute 'failed'"
}
```

### Actual Results

```console
The full traceback is:
Traceback (most recent call last):
  File "/path/to/ansible/lib/ansible/template/__init__.py", line 438, in __getitem__
    plugin = self._pluginloader.get(key)
  File "/path/to/ansible/lib/ansible/plugins/loader.py", line 830, in get
    return self.get_with_context(name, *args, **kwargs).object
  File "/path/to/ansible/lib/ansible/plugins/loader.py", line 1131, in get_with_context
    raise KeyError('invalid plugin name: {0}'.format(key))
KeyError: 'invalid plugin name: ansible.builtin.=='

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path/to/ansible/lib/ansible/executor/task_executor.py", line 525, in _execute
    self._task.post_validate(templar=templar)
  File "/path/to/ansible/lib/ansible/playbook/task.py", line 291, in post_validate
    super(Task, self).post_validate(templar)
  File "/path/to/ansible/lib/ansible/playbook/base.py", line 525, in post_validate
    value = templar.template(getattr(self, name))
  File "/path/to/ansible/lib/ansible/template/__init__.py", line 755, in template
    d[k] = self.template(
  File "/path/to/ansible/lib/ansible/template/__init__.py", line 729, in template
    result = self.do_template(
  File "/path/to/ansible/lib/ansible/template/__init__.py", line 992, in do_template
    res = self.environment.concat(rf)
  File "/path/to/ansible/lib/ansible/template/native_helpers.py", line 44, in ansible_eval_concat
    head = list(islice(nodes, 2))
  File "<template>", line 17, in root
  File "/path/to/ansible/lib/ansible/template/__init__.py", line 264, in wrapper
    return list(ret)
  File "/usr/lib/python3.10/site-packages/jinja2/filters.py", line 1765, in select_or_reject
    if func(item):
  File "/usr/lib/python3.10/site-packages/jinja2/filters.py", line 1750, in <lambda>
    return lambda item: modfunc(func(transfunc(item)))
  File "/usr/lib/python3.10/site-packages/jinja2/filters.py", line 1745, in func
    return context.environment.call_test(name, item, args, kwargs)
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 589, in call_test
    return self._filter_test_common(
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 510, in _filter_test_common
    func = env_map.get(name)  # type: ignore
  File "/usr/lib/python3.10/_collections_abc.py", line 819, in get
    return self[key]
  File "/path/to/ansible/lib/ansible/template/__init__.py", line 440, in __getitem__
    raise TemplateSyntaxError('Could not load "%s": %s' % (key, to_native(e)), 0)
jinja2.exceptions.TemplateSyntaxError: Could not load "==": 'invalid plugin name: ansible.builtin.=='
  line 0
localhost | FAILED! => {
    "changed": false
}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
if shared_loader_obj is not None:
            display.deprecated(
                "The `shared_loader_obj` option to `Templar` is no longer functional, "
                "ansible.plugins.loader is used directly instead.",
                version='2.16',
            )
        self._loader = loader
        self._available_variables = {} if variables is None else variables
        self._fail_on_undefined_errors = C.DEFAULT_UNDEFINED_VAR_BEHAVIOR
        environment_class = AnsibleNativeEnvironment if C.DEFAULT_JINJA2_NATIVE else AnsibleEnvironment
        self.environment = environment_class(
            extensions=self._get_extensions(),
            loader=FileSystemLoader(loader.get_basedir() if loader else '.'),
        )
        self.environment.template_class.environment_class = environment_class
        
        self.environment.globals['dict'] = dict
        
        self.environment.globals['lookup'] = self._lookup
        self.environment.globals['query'] = self.environment.globals['q'] = self._query_lookup
        self.environment.globals['now'] = self._now_datetime
        self.environment.globals['undef'] = self._make_undefined
        
        self.cur_context = None
        
        self.SINGLE_VAR = re.compile(r"^%s\s*(\w*)\s*%s$" % (self.environment.variable_start_string, self.environment.variable_end_string))
        self.jinja2_native = C.DEFAULT_JINJA2_NATIVE
    def copy_with_new_env(self, environment_class=AnsibleEnvironment, **kwargs):