Use the right serializer when doing patch updates.

We were serializing non-dependent relations, so unnecessary changes
were taking place in Patch mode.
Improve javadoc