Reproduce: 1. Creat 2 layers 2. Switch them with each other 3. Do it few times Result: The application hangs P.s. seems that the bug was introduced during refactoring to Svelte 5