### 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
#
#
#
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import ast
import datetime
import os
import pwd
import re
import time
from collections.abc import Iterator, Sequence, Mapping, MappingView, MutableMapping
from contextlib import contextmanager
from numbers import Number
from traceback import format_exc
from jinja2.exceptions import TemplateSyntaxError, UndefinedError
from jinja2.loaders import FileSystemLoader