<!--- 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'

```

if not iterator.is_failed(host) or iterator._play.force_handlers:
                task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=handler)
                self.add_tqm_variables(task_vars, play=iterator._play)
                templar = Templar(loader=self._loader, variables=task_vars)
                if not handler.cached_name:
                    handler.name = templar.template(handler.name)
                    handler.cached_name = True
                self._queue_task(host, handler, task_vars, play_context)
                if templar.template(handler.run_once) or bypass_host_loop:
                    break
        
        host_results = self._wait_on_handler_results(iterator, handler, notified_hosts)
        included_files = IncludedFile.process_include_results(
            host_results,
            iterator=iterator,
            loader=self._loader,
            variable_manager=self._variable_manager
        )
        result = True
        if len(included_files) > 0:
            for included_file in included_files:
                try:
                    new_blocks = self._load_included_file(included_file, iterator=iterator, is_handler=True)
                    
                    
                    for block in new_blocks:
                        iterator._play.handlers.append(block)
                        for task in block.block:
                            task_name = task.get_name()
                            display.debug("adding task '%s' included in handler '%s'" % (task_name, handler_name))