handle equality tests depth-first so we can tell where failures are