Fix a deadlock in the state transfer manager.