Fixed a problem related to layouting new links in cases where the diagram already existed