Issue #3270736 by kunal.sachdev: Ensure new, changed or removed permissions are in the correct state after an update