Bug in pseudocode and implementation 

This looks wrong for the case where either the left or right set has multiple matches for any single row in the other set.
Given simple result set 
Left(A,B,C,D)
Right(B, C, C, D, E)
This code would give (B, C, D) while the correct result is (B, C, C, D)