After moving a MIDI note then pressing undo, the MIDI note sounds with infinite sustain, i.e. no note off event.

Steps To Reproduce

Enable "Sound MIDI notes as they are selected in the editor".
Select a MIDI note - hear it sound briefly.
Drag MIDI note - hear it sound briefly for each note it is dragged to.
Press Ctrl+z to undo the move.
Expected behaviour: MIDI note returns to previous position and sounds briefly.
Actual behaviour: MIDI note returns to previous position and sounds continuously, i.e. there is a note on event but not a note off event.