Rebase on latest downstream 1.9 changes.