PythonException needs to be aware of refs too