Debugged this a bit with WSDL, CreateWindowExW is failing with ERROR_INVALID_PARAMETER
(no, WSDL doesn't bother telling us error codes...) There is a comment a few lines before that I believe explains this:
// ignore failure, which is probably caused by not unregistering the class
It seems RegisterClassW fails and returns 0. To "reuse" the class as the comment explains would require storing it in a global variable or something, and similar to unregister it on shutdown. The official SDL has logic for that.
I made a quick patch to fix this, but there are only more problems. The new window is created and looks ok, but keyboard input stops working and there is a new error on shutdown. There is a global "is_quitting" variable that never gets reset after shutdown, fixing that leads to even stranger errors. There must be some more global state somewhere...
These problems don't occur with Atlas because wxWidgets is responsible for much of the init. Needless to say I like the idea of restarting the engine even less now than I did before :(