This is no new code, just moved down here from L233.
Before this change, even when an invite code was set and not correctly provided, the sign-up page was still rendered and only once the user made the effort to fill the form and submit the "invite_only" view was rendered.