If at least one record had already the target, the target was not added to any records. This is because the test for existing link was only done on the target id instead of the tuple origin and target. issue5792 review26551002