netjson: do not duplicate nodes when adding a mid