Adds recursive test for equality