TRUNK-3909, backport edit_privilege fix to 1.9.x(pull out TRUNK-4025 in a separate pull request)