You were right about the bug. When I created the user-emacs-<domain>-dir libraries, which contained by default the subdirectory "emacs", I forgot to take it from the xdg-get-user-file. Needless to say, I have only remembered of creating the user-emacs-<domain>-dir variables right before I commited. I have been using the library for months without a flaw.
So the bug is now corrected. Thanks for the heads up.
About the stability of the specification: according to the XDG Web site, the last version of the specification dates from 2010. That is six years of no modifications. Seems to be pretty stable now. Maybe it is time for Emacs to start the adoption of the XDG Base Dir Spec and separate the files.
A .emacs.d/init.el could be a fallback for user-init-file, as .emacs is today. Also, maybe in Windows the xdg-<domain>-dir variables could take other values and not the defaults I hardwired. As Windows is really not what I use, the package is pending suggestions of improvement.
As to the API, should the locate-user-emacs-<domain>-file be renamed? locate-user-emacs-file has the NEW-NAME OLD-NAME parameters, and creates unconditionally the directory when OLD-NAME is not passed.