At least it doesn't seem "obviously correct" to me: what if the user
opens up an X frame after starting "emacs -nw"?

The hang arises when emacs is started without an X server present or at
least with DISPLAY not set. I don't see how a user would be able to
open an X frame at a later point in time in that situation (or
reasonable expect he might be able to).

Easy: M-x make-frame-on-display.
Or start an emacs server and then connect to the server from an
emacsclient with a DISPLAY set (which ends up calling
make-frame-on-display as well, of course).

So maybe the test
if (inhibit_window_system || !display_arg)
in my patch should be replaced by
if (!x_in_use)
Ken