You can reproduce roger64's issue with the following HTML sample code, which is not identical to roger64's code, but produces the same error:
Before cleaning:
Code:
<table>
<col width="80"/>
<col width="100"/>
<col width="320"/>
<tr>
<td>row 1, col 1</td>
<td>row 1, col 2</td>
<td>row 1, col 3</td>
</tr>
</table>
After cleaning:
Code:
<table>
<colgroup>
<col width="80"/>
<col width="100"/>
<col width="320"/>
</colgroup>
<tbody>
<tr>
<td>row 1, col 1</td>
<td>row 1, col 2</td>
<td>row 1, col 3</td>
</tr>
</tbody>
</table>
@roger64: Your original table is invalid because it was missing <colgroup> and <tbody> tags.
AFAIK, the welformedness check can't catch these issues, because it can only flag problems with existing tags. I.e. it can only find missing or improperly nested tags.
BTW, epubcheck didn't find these problems either.