Fix a segfault during shutdown attempting to kill rogue cursors after a ...

...failover