Avoid potential deadlock in TransportKeyManager. #235 See rambling description on the ticket and in the architecture channel... Fixes #235. See merge request !79