Add code quality test for self assignments

> change while -> if in preceding line

That was done.

> change this to "return self == other.base"

And that seems to be wrong.