Add test from QuickCheck
unifyRecurse does visited check on both refs