To fix (sort {$a <=> $b} keys %hash) in particular but
should cover a number of other as-yet-unknown cases as well.
p4raw-id: //depot/perl@7162
mt = SVt_PVNV;
break;
case SVt_PVIV:
+ if (SvREADONLY(sv) && SvFAKE(sv)) {
+ sv_force_normal(sv);
+ }
pv = SvPVX(sv);
cur = SvCUR(sv);
len = SvLEN(sv);