fix lookup of __SYSERR_CALLBACK in class context
Revert "fix NameError"

This reverts commit 808a54336585628513c466eb61c0f04a7f5ed5bb.
merge the old fix for the name error