Merge upstream changes (SVN revision 8789)