Merge from upstream (r1449)