This is a continuation of dicussion here: #45 (comment)
Steps to reproduce
See failing test here: 7cf32fd
The test extends an array with 5 elements to 9 elements with undefined or null values.
Expected result
Four add patches to add null elements.
Actual result
One add patch and one replace patch.