<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below -->
While using a simple reproducer with either force_valid_group_names=silently or force_valid_group_names=always an unexpected exception is thrown:
Sample playbook:

```
---
- hosts: localhost
  connection: local
  gather_facts: false
  tasks: 
    - name: add a host to a group
      add_host:
        name: localhost
        groups: Not-Working
```

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
inventory
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible --version
ansible 2.9.0.dev0
  config file = /opt/gmuniz/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible-devel/ansible/lib/ansible
  executable location = /opt/ansible-devel/ansible/bin/ansible
  python version = 2.7.5 (default, Apr  9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```
ansible-config dump --only-changed
TRANSFORM_INVALID_GROUP_CHARS(/opt/gmuniz/ansible.cfg) = always

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
CentOs-7

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->

<!--- Paste example playbooks or commands between quotes below -->
```
- hosts: localhost
  connection: local
  gather_facts: false
  tasks: 
    - name: add a host to a group
      add_host:
        name: localhost
        groups: Not-Working

```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
I expect the host to be added to the group either with the originally provided name or the replaced underscore name.

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes -->
```
TASK [add a host to a group] *************************************************************************************************************************************************************************************
task path: /opt/gmuniz/add_host.yml:6
creating host via 'add_host': hostname=localhost
 [WARNING]: A duplicate localhost-like entry was found (localhost). First found localhost was localhost

 [WARNING]: Invalid characters were found in group names and automatically replaced, use -vvvv to see details

ERROR! Unexpected Exception, this is probably a bug: u'Not-Working'

```

for listening_handler in listening_handler_block.block:
                                        listeners = getattr(listening_handler, 'listen', []) or []
                                        templar = self.get_handler_templar(listening_handler, iterator)
                                        listeners = listening_handler.get_validated_value(
                                            'listen', listening_handler._valid_attrs['listen'], listeners, templar
                                        )
                                        if handler_name not in listeners:
                                            continue
                                        else:
                                            found = True
                                        if listening_handler.notify_host(original_host):
                                            self._tqm.send_callback('v2_playbook_on_notify', listening_handler, original_host)
                                
                                if not found:
                                    msg = ("The requested handler '%s' was not found in either the main handlers list nor in the listening "
                                           "handlers list" % handler_name)
                                    if C.ERROR_ON_MISSING_HANDLER:
                                        raise AnsibleError(msg)
                                    else:
                                        display.warning(msg)
                    if 'add_host' in result_item:
                        
                        new_host_info = result_item.get('add_host', dict())
                        self._add_host(new_host_info, iterator)
                    elif 'add_group' in result_item:
                        
                        self._add_group(original_host, result_item)
                    if 'ansible_facts' in result_item:
                        
                        if original_task.delegate_to is not None and original_task.delegate_facts: