Add equality members to fix key-ref merging.