Good catch Neal!
I completely forgot about pyo files and the tests are usually not run with -O. The modified code checks for *.py?
diff --git a/Python/import.c b/Python/import.c
index f9d4246..cce854f 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -982,7 +982,8 @@
 	}
 
 	len = strlen(file);
-	if (len > MAXPATHLEN || PyOS_stricmp(&file[len-4], ".pyc") != 0) {
+        /* match '*.py?' */
+	if (len > MAXPATHLEN || PyOS_strnicmp(&file[len-4], ".py", 3) != 0) {
 		return PyUnicode_DecodeFSDefault(file);
 	}