Add guard to prevent CallingThreadDispatcher circular deadlocks. See #3064