Fix deadlock while recording MIDI controllers.