Lock mutex before second pthread_cond_wait in usbutils to prevent a race.