I've encountered this issue when my kOS script tried to deactivate and then activate an RT antenna. After calling 'deactivate' event the connection was lost. Any subsequent attempts at calling 'activate' resulted in 'No connection to send command on' even though the kOS script is running locally on the vessel.
It turns out the way #397 fixes #388 is by substituting the part's events. It wraps the originals with some RT specific checks, when the parts right-click menu is opened. (The problem does not occur when I don't ever open that menu). kOS uses those wrapped events, but because the vessel has no connection, they fail.
I know there were problems finding any other way of fixing #388, but the current solution is a bit invasive and breaks things.