When editing a document from the "web ui", the flags are shifted by 2 bit positions to the left.
Edits using the memcached protocol don't appear to affect the flags (as expected since they should be opaque). To be fair, this is probably because the transcoder I'm using is setting the flags again.
This throws off our serialization code since we use the flags to encode data about the version and class of the serialized JSON document.
Note: Editing it a second time seems to reset the flags back properly?