apply AMF spurious CRITICAL log (in SetPtrRef) fixes to mainline