##### SUMMARY
Ansible run fails and I want to retry the failed hosts with the --limit @windows.retry command and it fails with "ERROR! Unexpected Exception, this is probably a bug: string index out of range"

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
limit

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
$ ansible --version
ansible 2.9.0.dev0
  config file = /Users/tanner/projects/ansible.git/playbooks.git/celadonsystems.com/ansible.cfg
  configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible
  executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible
  python version = 2.7.10 (default, Feb 22 2019, 21:55:15) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
$ ansible-config dump --only-changed

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Management host macOS 10.14.6
Managed hosts various releases of Windows

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

<!--- Paste example playbooks or commands between quotes below -->
Run ansible and have a failure so you get the retry file
```yaml
$ ansible-playbook -i testing ../windows.yml  --limit @../windows.retry
```

##### EXPECTED RESULTS
Ansible will run for just the failed hosts in the retry file

##### ACTUAL RESULTS
ERROR! Unexpected Exception, this is probably a bug: string index out of range

<!--- Paste verbatim command output between quotes -->
```paste below
ERROR! Unexpected Exception, this is probably a bug: string index out of range
```

(a) if it matches the group name, the results include all hosts
                    in the group or any of its children.
                (b) otherwise, if it matches any hosts in the group, the results
                    include the matching hosts.
        This means that 'foo*' may match one or more groups (thus including all
        hosts therein) but also hosts in other groups.
        The built-in groups 'all' and 'ungrouped' are special. No pattern can
        match these group names (though 'all' behaves as though it matches, as
        described above). The word 'ungrouped' can match a host of that name,
        and patterns like 'ungr*' and 'al*' can match either hosts or groups
        other than all and ungrouped.
        If the pattern matches one or more group names according to these rules,
        it may have an optional range suffix to select a subset of the results.
        This is allowed only if the pattern is not a regex, i.e. '~foo[1]' does
        not work (the [1] is interpreted as part of the regex), but 'foo*[1]'
        would work if 'foo*' matched the name of one or more groups.
        Duplicate matches are always eliminated from the results.
        """
        if pattern[0] in ("&", "!"):
            pattern = pattern[1:]
        if pattern not in self._pattern_cache:
            (expr, slice) = self._split_subscript(pattern)
            hosts = self._enumerate_matches(expr)
            try:
                hosts = self._apply_subscript(hosts, slice)
            except IndexError:
                raise AnsibleError("No hosts matched the subscripted pattern '%s'" % pattern)
            self._pattern_cache[pattern] = hosts
        return self._pattern_cache[pattern]
    def _split_subscript(self, pattern):