correct variable self compare
Merge pull request #370 from dbmalkovsky/ACT-2099

ACT-2099: correct variable self compare