Fixes #8571: allow table classes in thead and tfoot