add test for selfjoins unfolding