Make sure disconnect callbacks are always called, with or without using the lock.