Fixed unittest to have correct expected value.
Correctly generate changes for arrays. Fixes #2049