improve html indent handling of unclosed non-parent tags

refs #332