Second fix for MIDI device reselect bug
-
I previously made a fix for the MIDI device reselect bug but it was inconsistent.
Appeared to work for me but not others.
Here's another attempt - again works for me but try it in your fork if this bugs hits you.