<!--- 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
Modules that I create inside collections that exist in the `ansible` namespace do not work.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
ansible-galaxy
collections

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```
ansible 2.9.0.dev0
  config file = None
  configured module search path = ['/home/meyers/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/meyers/ansible/virtualenv/ansible-dev3/local/lib/python3.7/site-packages/ansible
  executable location = /home/meyers/ansible/virtualenv/ansible-dev3/bin/ansible
  python version = 3.7.3 (default, Apr  3 2019, 05:39:12) [GCC 8.3.0]
```

##### CONFIGURATION
blank

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


##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
* Create two adjacent collections `a.foo` and `ansible.foo` w/ a single module, `my_test.py`.
* Call the module via `ansible.foo.my_test` and `a.foo.my_test`

<!--- Paste example playbooks or commands between quotes below -->
`collections/ansible_collections/ansible/foo/plugins/modules/my_test.py`

```yaml
# my_test.py
#!/usr/bin/python

# Copyright: (c) 2018, Terry Jones <terry.jones@example.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

ANSIBLE_METADATA = {
    'metadata_version': '1.1',
    'status': ['preview'],
    'supported_by': 'community'
}

DOCUMENTATION = '''
---
module: my_test
short_description: This is my test module
version_added: "2.4"
description:
    - "This is my longer description explaining my test module"
options:
    name:
        description:
            - This is the message to send to the test module
        required: true
    new:
        description:
            - Control to demo if the result of this module is changed or not
        required: false

extends_documentation_fragment:
    - azure
author:
    - Your Name (@yourhandle)
'''

EXAMPLES = '''
# Pass in a message
- name: Test with a message
  my_test:
    name: hello world

# pass in a message and have changed true
- name: Test with a message and changed output
  my_test:
    name: hello world
    new: true

# fail the module
- name: Test failure of the module
  my_test:
    name: fail me
'''

RETURN = '''
original_message:
    description: The original name param that was passed in
    type: str
    returned: always
message:
    description: The output message that the test module generates
    type: str
    returned: always
'''

from ansible.module_utils.basic import AnsibleModule

def run_module():
    # define available arguments/parameters a user can pass to the module
    module_args = dict(
        name=dict(type='str', required=True),
        new=dict(type='bool', required=False, default=False)
    )

    # seed the result dict in the object
    # we primarily care about changed and state
    # change is if this module effectively modified the target
    # state will include any data that you want your module to pass back
    # for consumption, for example, in a subsequent task
    result = dict(
        changed=False,
        original_message='',
        message=''
    )

    # the AnsibleModule object will be our abstraction working with Ansible
    # this includes instantiation, a couple of common attr would be the
    # args/params passed to the execution, as well as if the module
    # supports check mode
    module = AnsibleModule(
        argument_spec=module_args,
        supports_check_mode=True
    )

    # if the user is working with this module in only check mode we do not
    # want to make any changes to the environment, just return the current
    # state with no modifications
    if module.check_mode:
        module.exit_json(**result)

    # manipulate or modify the state as needed (this is going to be the
    # part where your module will do what it needs to do)
    result['original_message'] = module.params['name']
    result['message'] = 'goodbye'

    # use whatever logic you need to determine whether or not this module
    # made any modifications to your target
    if module.params['new']:
        result['changed'] = True

    # during the execution of the module, if there is an exception or a
    # conditional state that effectively causes a failure, run
    # AnsibleModule.fail_json() to pass in the message and the result
    if module.params['name'] == 'fail me':
        module.fail_json(msg='You requested this to fail', **result)

    # in the event of a successful module execution, you will want to
    # simple AnsibleModule.exit_json(), passing the key/value results
    module.exit_json(**result)

def main():
    run_module()

if __name__ == '__main__':
    main()

```

```yaml
# main.yml
- hosts: localhost
  gather_facts: false
  tasks:
    - ansible.foo.my_test:
        name: "hello world"
    - a.foo.my_test:
        name: "hello world"
```

Copy the ansible subdir into a.
```
.
├── collections
│   └── ansible_collections
│       ├── a
│       │   └── foo
│       │       └── plugins
│       │           └── modules
│       │               └── my_test.py
│       └── ansible
│           └── foo
│               └── plugins
│                   └── modules
│                       └── my_test.py
└── main.yml
```

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

##### EXPECTED RESULTS
* For both `ansible.foo.my_test` and `a.foo.my_test` to succeed.


##### ACTUAL RESULTS
* `ansible.foo.my_test` fails because the module can not be found (see below)

<!--- Paste verbatim command output between quotes -->
```
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to be in '/home/meyers/ansible/ansible-examples/collection_ansible_namespace/main.yml': line 4, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
    - ansible.foo.my_test:
```

"""
        Parse a string as a fully-qualified collection reference, raises ValueError if invalid
        :param ref: collection reference to parse (a valid ref is of the form 'ns.coll.resource' or 'ns.coll.subdir1.subdir2.resource')
        :param ref_type: the type of the reference, eg 'module', 'role', 'doc_fragment'
        :return: a populated AnsibleCollectionRef object
        """
        
        
        
        
        
        
        if not AnsibleCollectionRef.is_valid_fqcr(ref):
            raise ValueError('{0} is not a valid collection reference'.format(to_native(ref)))
        ref = to_text(ref, errors='strict')
        ref_type = to_text(ref_type, errors='strict')
        resource_splitname = ref.rsplit(u'.', 1)
        package_remnant = resource_splitname[0]
        resource = resource_splitname[1]
        
        
        package_splitname = package_remnant.split(u'.', 2)
        if len(package_splitname) == 3:
            subdirs = package_splitname[2]
        else:
            subdirs = u''
        collection_name = u'.'.join(package_splitname[0:2])
        return AnsibleCollectionRef(collection_name, subdirs, resource, ref_type)
    @staticmethod
    def try_parse_fqcr(ref, ref_type):