fix `equal-[secondary-]hash-code` for impersonators

Merge to v5.0.1