Fixing check for duplicated registrations that was destroyed in merge.

Hopefully for the last time.