Never deref() a reference exiting a W_PHPGenericAdapter via to_php().
Ensure returning a PHPRefAdapter to PHP does something sensible.