fix treeLocEqual and improve TreeLocArbitrary