Make sure linked and linked_conn can't get out of sync
In legacy/trac#21576, we encountered a situation where linked is true, but linked_conn is NULL. This shouldn't happen, so we need to diagnose the error, and fix it.
issue