Prevent a bug when computing the Set

The array_replace function was not a good idea, as it replaces
all its indexes with the corresponding index if there is one in
the following arrays.

Which meant that if the old snapshot had these data
`['foo', 'bar', 'fubar']`, and the new one `['foo', 'baz']`, the
resulting array would be `['foo', 'baz', 'fubar']` when
`['foo', 'bar', 'fubar', 'baz']` was expected.