Don't try to store a reference to a shared pointer.