Ok, hopefully this is the right patch after rebase and format-patch.