Thread: merge fixes for #8422, #8458, #8674.

svn path=; revision=84750