LayoutItem::operator==(): Fix a comparison to self.

Found by Coverity Scan.