Skip typerefs when comparing the pointed-to types of pointers.