Restore <thead>s in templates