Fix a long-standing serialization bug.

Fixes a harmony test.

This patch touches two very similar-looking methods that are sadly just
different enough that we can't factor the duplication out until we can
rely on inlining.

Change-Id: I9c47f08911fea1472c2cb36b7cf94ab6a4e630aa
tree: 4b825dc642cb6eb9a060e54bf8d69288fbee4904

This tree is empty.