Assert that an unweaken()ed ref remains a ref
Need to call sv_setsv(sv, &PL_sv_undef) rather than sv_clear(sv) to just set it to undef