Fix writes getting processing multiple times.
Fix modify in place for arrays

When modifying the objects in-place, if updating an array-like object,
update length to match the new object.  This is necessary when the new
array is shorter than the old array, because "delete" doesn't update the
length parameter.