Fixes #2648.  Got the source and target wrong when processing partner
edges.