diff -rup Scope-Upper-0.25-PTRJcS-orig/Upper.xs Scope-Upper-0.25-PTRJcS/Upper.xs
--- Scope-Upper-0.25-PTRJcS-orig/Upper.xs 2014-09-20 09:06:30.000000000 -0700
+++ Scope-Upper-0.25-PTRJcS/Upper.xs 2014-11-10 22:19:40.000000000 -0800
@@ -1533,8 +1533,10 @@ STATIC void su_uplevel_restore(pTHX_ voi
* depth to be 0, or perl would complain about it being "still in use".
* But we *know* that it cannot be so. */
if (sud->renamed) {
- CvDEPTH(sud->renamed) = 0;
- CvPADLIST(sud->renamed) = NULL;
+ if (!CvISXSUB(sud->renamed)) {
+ CvDEPTH(sud->renamed) = 0;
+ CvPADLIST(sud->renamed) = NULL;
+ }
SvREFCNT_dec(sud->renamed);
}