Reducing number of input pins doesn't remove pin element and links from sourcecode.xml

When checking the TTY i faced a bug (that might be known):

Reducing the count of (at least) the Add (Value) node, the GUI removes the pin and links to it just fine, whereas the link and the pin remain in the source code.

<NODE systemname="Add (Value)" nodename="Add (Value)" componentmode="Hidden" id="0">
   <BOUNDS type="Node" left="1725" top="3375" width="100" height="100">
   <PIN pinname="Input Count" slicecount="1" values="3">
   <PIN pinname="Input 4" visible="1">

That leads to
ERR : Corrupt link-message

Space-bar + right click > Main > Cleanup Links should clean XML.