back ported use SecurityManager.getClassContext instead of stack unwinding