I think the only thing needed as a fix is to change the error message into “You did not enter the invite code” .
After all, when I look at the source, the only flow where this message will be shown is when the invite code is set, and not submitted. All other account registration errors return a custom error message.
When an email address is already registered, no message will be shown at all, and an email will be sent to that email address.