Fix bug with <element> specifying xs attribute. Closes #269 on github.