mutator: check that there is no table self-reference before squashing operations

Fixes #11