Merging r259346 (with adjustments for r258867):