### Describe the bug [`{#each expression as name (key)}...{/each}`](https://svelte.dev/docs/logic-blocks#each) The issue is that the behavior of `key` in the above syntax is different in Svelte 4 and 5. It took a lot of time to lock in to this and make an intuitive minimal reproduction. Strangely, somehow it couldn't be reproduced in the official `Svelte5-REPL`, so I had to use `StackBlitz` to provide an online preview. You can see in the demo how the actual rendering of the component elements behaves differently when changing the order of the array elements. ### Reproduction [StackBlitz-svelte-4.2.15](https://stackblitz.com/edit/vitejs-vite-cb3lvu?file=package.json,src%2FItem.svelte,src%2FApp.svelte) [StackBlitz-svelte-5.0.0-next.108](https://stackblitz.com/edit/vitejs-vite-nj2zgc?file=package.json,src%2FItem.svelte,src%2FApp.svelte) [Svelte5-REPL](https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE41Qy07DMBD8lWG5JJLTlEc5pGkQx35DzcFttsJSXrLdiirKv6N1aJHgwsXeHc3szs5IR9uwp2I3UmdapoLehoEUhcsgjT9zE5gU-f7kDoKU_uDsECrd6WDboXcB28Atjq5voWmRS7eYdZrWQms4wDhnLthg96DwqPCk8KywUnh5v1F6V7PDBsGdOIKew7YL7M6mSZIUmwqjwDpcmXexWM_gdUP8F753IUmMwj4Kk1nyCoMMexTYI4NJ06idFFbLpdRl_nNdN96zOXx8OzceVs5M5E0nkZW1PVej9FOZSx3BGMaMIq90N-YyZdIdKWr72h4t11TIjZO6ZS6i_4bOnzF0SUy2_HZdXp1kWTbbEMIM_rXwPn0BVrirKQICAAA=) (Unable to reproduce) https://github.com/sveltejs/svelte/assets/61939856/2b706191-d133-41eb-94cf-7d6caafcc88f ### Logs _No response_ ### System Info ```shell svelte: 5.0.0-next.108 ``` ### Severity blocking an upgrade