Clone memory when committing a scanline to ensure per-scanline memory changes stick