Backporting a patch from upstream and bzr workflows.