#7842: backport fix for py_compile.compile syntax error message handling.