If _InternalImportModule found a module in the ModuleFinder._modules cache which was already found to be missing (stored as None), the returnError field would incorrectly be set to False. I've done away with the returnError field, and just check whether the returned module value is None. As far as I can see, returnError==True always implied module==None and vice versa, so there's no need for a separate value.
_ImportAllSubModules would try to load submodules even if the module name was not a valid Python identifier. It would see foo.cpython-32mu.so in other Python versions as a module name foo.cpython-32mu with the valid .so suffix. Now it checks that the module name is a valid Python identifier before trying to load it. I've also added a test for this.