Merge from trunk GCC workaround (fixes #8651)

svn path=; revision=84747