+ if (SvRMAGICAL(sv) && !tied) {
+ /* Temporarily hide the RMAGICAL flag of the hash so it isn't wrongly
+ * mistaken for a tied hash by the rest of hv_common. It will be reset by
+ * the op_ppaddr of a new fake op injected between the current and the next
+ * one. */
+ OP *o = PL_op;
+ if (!o->op_next || o->op_next->op_ppaddr != vmg_pp_resetuvar) {
+ SVOP *svop;
+ NewOp(1101, svop, 1, SVOP);
+ svop->op_type = OP_STUB;
+ svop->op_ppaddr = vmg_pp_resetuvar;
+ svop->op_next = o->op_next;
+ svop->op_flags = 0;
+ svop->op_sv = sv;
+ o->op_next = (OP *) svop;
+ }
+ SvRMAGICAL_off(sv);
+ }
+