Work around inability to link lifetime of ref bindings (#16994)