Changing the isomorphism tests to give better error messages