Fix problems with gerrit merge and revert