Merged from upstream.