Fix deadlock of watching while reconnecting

Ensure that locks are acquired in the same order.