##### 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 
context = self._context(variables={'some_unsafe_key': [wrap_var('some unsafe string 1')]})
        res = context.resolve('some_unsafe_key')
        
        self.assertTrue(self.is_unsafe(res),
                        'return of AnsibleContext.resolve (%s) was expected to be marked unsafe but was not' % res)
    def test_resolve_unsafe_dict(self):
        context = self._context(variables={'some_unsafe_key':
                                           {'an_unsafe_dict': wrap_var('some unsafe string 1')}
                                           })
        res = context.resolve('some_unsafe_key')
        self.assertTrue(self.is_unsafe(res['an_unsafe_dict']),
                        'return of AnsibleContext.resolve (%s) was expected to be marked unsafe but was not' % res['an_unsafe_dict'])
    def test_resolve(self):
        context = self._context(variables={'some_key': 'some_string'})
        res = context.resolve('some_key')
        self.assertEqual(res, 'some_string')
        
        self.assertFalse(self.is_unsafe(res),
                         'return of AnsibleContext.resolve (%s) was not expected to be marked unsafe but was' % res)
    def test_resolve_none(self):
        context = self._context(variables={'some_key': None})
        res = context.resolve('some_key')
        self.assertEqual(res, None)
        
        self.assertFalse(self.is_unsafe(res),
                         'return of AnsibleContext.resolve (%s) was not expected to be marked unsafe but was' % res)