Fix bug where snippet access was changed while editing.

We only want to change the snippet access when the snippet is saved.