>> Could you file a feature request (i.e. bug) on the bug tracker for now?
I finally managed to stop procrastinating on this and added a blueprint rather than a bug: a bug would imply an error in lxml or libxslt but I suspect this issue might be something not even the XML and XSLT specifications consider and/or allow.