Add code quality test for self assignments

The pr I sent had added processing for the multiple items you send in bad. If you don't use that then I think you should just break on the first occurance.

A test for this new function should also be added as there are for other quality tests.