Re #8686. Added check for PyErr_SystemExit for builds.