Only look for thead elements that are the direct children of the ng-table. Otherwise, you cannot embed a table within a table cell.