##### SUMMARY
An invalid syntax within a jinja2 statement results in the statement being returned instead of an syntax error.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
jinja2

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/PycharmProjects/ansible-2/lib/ansible
  executable location = /home/user/PycharmProjects/ansible-2/bin/ansible
  python version = 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127]
```

##### CONFIGURATION

##### OS / ENVIRONMENT

ArchLinux

##### STEPS TO REPRODUCE

```yaml
- name: Test
  hosts: localhost
  gather_facts: false
  become: false
  strategy: linear
  tasks:
    - debug:
        msg: "{{ foo | ipaddr('address')) }}"
```

##### EXPECTED RESULTS

Syntax error (two closing `)`-characters)

##### ACTUAL RESULTS

```paste below
ok: [localhost] => {
    "msg": "{{ foo | ipaddr('address')) }}"
}
```

@sivel 
display.warning(msg)
                    elif errors == 'ignore':
                        display.display(msg, log_only=True)
                    else:
                        raise AnsibleError(to_native(msg))
                ran = [] if wantlist else None
            if ran and not allow_unsafe:
                if wantlist:
                    ran = wrap_var(ran)
                else:
                    try:
                        ran = UnsafeProxy(",".join(ran))
                    except TypeError:
                        
                        
                        if not isinstance(ran, Sequence):
                            raise AnsibleError("The lookup plugin '%s' did not return a list."
                                               % name)
                        
                        
                        if len(ran) == 1:
                            ran = wrap_var(ran[0])
                        else:
                            ran = wrap_var(ran)
                if self.cur_context:
                    self.cur_context.unsafe = True
            return ran
        else:
            raise AnsibleError("lookup plugin (%s) not found" % name)
    def do_template(self, data, preserve_trailing_newlines=True, escape_backslashes=True, fail_on_undefined=None, overrides=None, disable_lookups=False):