This behaviour is caused by the routing algorithm trying unsuccessfully to find a path between shapes that are close together. When the Connector.Padding value is added to the rectangle bounding each shape and they overlap, a reasonable route cannot be found between the two shapes.
This behaviour has been fixed in the latest build (please see here). You can also reduce the number of routign issues by decreasing the Padding property - however lines may be routed more closely to shape boundaries.