Merge mainline for consistency fixes since divergence.