Fix problem with equals/hashcode for spies