Fix thead selector to only select direct children

Changed selector for thead element to only consider direct children.  This will enable nested tables with a thead element.