[FIX] XQuery, HTML Serialization: @selected is lost. Closes #840.