I have an attached patch that fixes the reported problem.
First, it adds a sanity check that no empty module name is checked for
(crashes the interpreter otherwise).
Second, the __path__ attribute is now a list. This does break
backwards-compatibility and thus cannot be backported to 2.6.
Third, I removed the special-casing of frozen packages and just made
frozen module checks a universal thing. This did change the module
resolution order such that frozen modules are checked before built-in
modules and registered modules under Windows (whatever those are).
Moving frozen modules after those two cases are possible if it's really
desired.
At this point I need a review to get this into 3.0 and a decision on
whether to backport to 2.7 (I say don't bother, out of
backward-compatibility, but it probably wouldn't really hurt anything
either).