wrapAll and table rows

wrapAll and table rows

I'm trying to apply thead and tbody to a table that doesn't have them. I'm trying to put all tr's after the first in tbody tags by using wrapAll.  When I apply the wrapAll to a set of rows, I get two tbody's one nested in the other.

$table = $("#myTable");
$rows = $table.find("tr");
$headerRow = $rows.first();
$bodyRows = $rows.slice(1);
$bodyRows.wrapAll("<tbody>");

I also get nested tbody's when I try wrapAll around all the rows.

$table = $("#myTable");
$rows = $table.find("tr");
$rows.wrapAll("<tbody>");

Any suggestions?  Is this how it's supposed to behave?