Merged changes from trunk. Fixes #8614.

svn path=; revision=84677