Fix race condition in adding TimeoutClusterStateListener

Fixes #2658