BOLT: Prevent rare crash in SharedPtr.

Fixes card-switching in BOLT.