Make setting and removing deep fields work properly.

Writing and removing so-called 'deep fields', for example using the mutate filter, doesn't currently work properly. This branch should resolve that. Note that I based it on 1.1.x.