Index: twisted/python/_reflectpy3.py
===================================================================
--- twisted/python/_reflectpy3.py	(revision 37124)
+++ twisted/python/_reflectpy3.py	(working copy)
@@ -194,9 +194,10 @@
     administrative error (entering the wrong module name), from programmer
     error (writing buggy code in a module that fails to import).
 
+    @param importName: The name of the module to import.
+    @type importName: L{str}
     @raise Exception: if something bad happens.  This can be any type of
     exception, since nobody knows what loading some arbitrary code might do.
-
     @raise _NoModuleFound: if no module was found.
     """
     try:
@@ -205,7 +206,7 @@
         excType, excValue, excTraceback = sys.exc_info()
         while excTraceback:
             execName = excTraceback.tb_frame.f_globals["__name__"]
-            if execName is None:
+            if execName is None or execName == importName:
                 reraise(excValue, excTraceback)
             excTraceback = excTraceback.tb_next
         raise _NoModuleFound()
