string literal copy error after making it empty
### Description

```nim
var a = (s: "a")
var b = "a"
a.s.setLen 0
b = a.s
assert b == ""
```

### Nim Version

Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-07-03
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 5935c3bfa9fec6505394867b23510eb5cbab3dbf
active boot switches: -d:release

### Current Output

```text
assertion error
```


### Expected Output

```text
nothing
```


### Known Workarounds

_No response_

### Additional Information

_No response_