I found the problem
My problem is occurring because of adv_gallery_categorybit_level1. If you look at it, it starts with:
</tbody>
<tbody>
This creates a closed tbody tag in the first listed category even though there is not an open tbody tag to match it.