Oh, whoops, I didn't realize it actually works that way :-)  In that case -- yes, I think the current behavior is wrong.  If you hit close and choose to save unsaved changes, the file should still close afterward.  It works that way for non-untitled documents, so untitled should be consistent.

If you want we could spin that off as a bug instead of holding up this big pull request.