Parial fix for issue #8677: exclude early exit in equals() for Mod