this bug is not so easy to explain. almost (at least with ctrlr as plugin) i have to re-set the midi channels, because the in and out are always exchanging.
in example: the midi input of a panel is set to "1", the output is set to "2". after reloading the panel the input is set to "2", output to "1". in plugin mode this happens very often.
also try this in standalone mode:
-create a panel
-make midi channel in/out visible in the toolbar (by default it should be "midi in =1", "midi out =1"
-now change the midi output (but NOT in the toolbar, do it in properties panel (right side) to value "2".
-now accidentaly the midi IN changes to "2", though you've changed the midi OUT
-after saving/reloading you can see in the toolbar AND in the panel properties, that the inputs/outputs are exchanged (in both places, toolbar/properties).
this bug still exists - and drives the user still crazy (in case of using a different midi in/out channel). please fix it!