Fix issue #47 - Better algorithm for serialize diffs