Repository: svelte
Issue: Svelte 5: Mutating property of passed in object locks up browser
Labels: awaiting submitter

### Describe the bug

Running in Svelte 4 / non-runes mode.

Sorting a child array on an object property passed in triggers reactivity as though the passed in property changed (it's not using bind) resulting in the browser locking up.

Seems to happen if data comes from a SK `load` fn, and is then passed from the page to a component that changes it (without using bind)

Pausing the code sometimes breaks at the error shown below.

### Reproduction

**+page.js**
```ts
export async function load() {
	return {
		folder: {
			name: 'a',
			count: 1,
			children: [
				{ name: 'e', count: 3 },
				{ name: 'c', count: 4 },
				{ name: 'd', count: 2 },
				{ name: 'b', count: 1 },
			],
		},
	}
}
```

**+page.svelte**
```html
<script>
	import Component from './Component.svelte'

	export let data

	$: folder = data.folder
</script>

<Component {folder} />
```

**Component.svelte**
```html
<script>
	export let folder

	function sortedChildren(folder) {
		return folder.children.sort((a, b) => a.count - b.count)
	}
</script>

<h1>{folder.name}</h1>

<ul>
	{#each sortedChildren(folder) as child}
		<li>{child.name} {child.count}</li>
	{/each}
</ul>
```

### Logs

```
client.js:299 Uncaught (in promise) Svelte error: effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
    at effect_update_depth_exceeded (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:137:19)
    at infinite_loop_guard (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1197:5)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1342:5)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
    at flush_sync (http://localhost:5173/node_modules/.vite/deps/chunk-WMXRUQR4.js?v=290ed5a1:1352:7)
```


### System Info

```shell
System:
    OS: macOS 14.4.1
    CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
    Memory: 284.70 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.0.0 - ~/Library/pnpm/node
    npm: 10.5.1 - ~/Library/pnpm/npm
    pnpm: 9.1.0 - ~/Library/pnpm/pnpm
    bun: 1.0.0 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 123.1.64.113
    Chrome: 124.0.6367.119
    Chrome Canary: 126.0.6465.0
    Safari: 17.4.1
    Safari Technology Preview: 17.4
  npmPackages:
    svelte: ^5.0.0-next.123 => 5.0.0-next.123
```


### Severity

annoyance