Adapted from commit 0061edc2 from mer-stable branch.
This will create a new commit in order to revert the existing changes.