`SIGSEGV` with `lent` and ORC
### Description

```nim
import std/strutils
func g(e: seq[string]): lent seq[string] = result = e
proc k(f: string): seq[string] = f.split("/")
proc n() =
  const r = "/d/"
  let t =
    if true:
      k(r).g()
    else:
      k("/" & r).g()
  echo t

n()
```

### Nim Version

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

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

```
Nim Compiler Version 2.1.9 [Linux: amd64]
Compiled at 2024-08-16
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: e96fad1eed5c87a5a0b13bb39d1e5da176e488e1
active boot switches: -d:release
```

### Current Output

```text
Traceback (most recent call last)
/tmp/u.nim(13)           u
/tmp/u.nim(11)           n
nimdevel/lib/system/dollars.nim(123) $
nimdevel/lib/system/dollars.nim(106) collectionToString
nimdevel/lib/system.nim(2614) addQuoted
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault
```


### Expected Output

```text
No SIGSEGV
```


### Possible Solution

_No response_

### Additional Information

_No response_