Bugfix: allow thead without tr

html like
<thead>
  <th>Header 1</th>
  <th>Header 2</th>
</thead>

behaves as
<thead>
  <tr>
    <th>Header 1</th>
    <th>Header 2</th>
  </tr>
</thead>