Fixed some small bugs with saving layers.

Fixed a problem where, when we inserted a layer or loaded a map, we'd
write all that data back as operations.