Proposed fix for bug #6410

I also broadened the existing startContainer adjustment to cover TH elements. Please note that I haven't been able to test any of these changes in any browsers other than Chrome.