Fixed recursive_compare()

It was terribly broken :(. Was hasty earlier.