Fix bug in assertTableEq and assertTableNe

* Replace code copy and pasted from elsewhere so no longer fails