### Describe the bug The are multiple random ways to reproduce the error, however, each random patterns are always reproductible. Easiest pattern: Move Row A to third position then Move Row D to last position. [screen-capture.webm](https://github.com/sveltejs/svelte/assets/490234/205fcac2-c1af-4f5a-ad2f-45b1653de1e3) ### Reproduction [Svelte 5: CodeSandbox](https://codesandbox.io/p/devbox/svelte-each-demo-j5rvjz) [Svelte 4: CodeSandbox](https://codesandbox.io/p/devbox/svelte-each-demo-forked-flzcsj) [REPL Simple dependency less (credits to 7nik in the comments below)](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA12R0WqDMBSGX-U0G8OCaLduN2qF7X5PoL1IzREDmoTktDAk775EHWW9kHhO_v87f5KZ9XJEx4pmZopPyAr2aQxLGf2YWLgbjoShdvpqu9ipXGelobpVLcnJaEswg1bf-qoIPPRWT9BuvpaVURa_EQkMt6io_Cu5tXCCZ0ecMGkOKbym8JbCMYX3FD7O-ygM0o2dJHs41TAvQOq0cgSScHKB0WRZtsKzbpCjCH_nElbl1pfKoaUv7LXFZPE1h3O6EprjOiyo83yL1axhDvc85T8eNwaVSB79j-boDIiQJpBpQAhmgRYFaBtWkA640mHDwm63iwwfUOHGqvx-z6oS8gYXqURBg3Snec3glzeYn5B3w5Kau-U8sKTa-zVR5QxX9Yu6OFPCHHd8YMfe4s6j28d5YUYdHnrSQvYSBSvIXtGf_S8fSTxNIwIAAA==) ### System Info ```shell 5.0.0-next.144 ``` ### Severity blocking all usage of svelte