Fixing bug where 'replaced' in Array.patch grew