fix parsing of self-closing tags

Resolves substrack/html-select#6
Merge branch 'selfclosing-tag-bug'