Replaced expensive "equals" method.