check abstract cast when unifying OpEq/OpNotEq (closes #2698)