(avoid-dupe-theads) make sure thead actually gets removed
Merge pull request #940 from cormacmccarthy/avoid-dupe-theads

(avoid-dupe-theads) make sure thead actually gets removed