Calling algorithm reverse causes a SIGSEGV on ORC
### Description

The following code runs on refc, but sigsegv on orc:

```nim
import std/algorithm

func rev(s: var string) =
  s.reverse

proc main =
  var abc = "abc"
  abc.rev
  echo abc

main()
```

### Nim Version

Nim Compiler Version 2.1.99 [Linux: amd64]
Compiled at 2024-09-18
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 04ccd2f4f07a169a03db3cc6f9316628c03f214a
active boot switches: -d:release

### Current Output

```text
Traceback (most recent call last)
/home/esteban/AtomProjects/crap/bug.nim(11) bug
/home/esteban/AtomProjects/crap/bug.nim(8) main
/home/esteban/AtomProjects/crap/bug.nim(4) rev
/home/esteban/.choosenim/toolchains/nim-#devel/lib/pure/algorithm.nim(136) reverse
/home/esteban/.choosenim/toolchains/nim-#devel/lib/pure/algorithm.nim(119) reverse
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault (core dumped)
Error: execution of an external program failed: '/home/esteban/AtomProjects/crap/bug'
```


### Expected Output

_No response_

### Known Workarounds

_No response_

### Additional Information

_No response_