`toSeq` / `mapIt` result cannot be assigned to `const`
### Description

```nim
import std/sequtils

proc f(a: static openArray[int]) =
  const s1 = a.mapIt(it)
  const s2 = a.toSeq()

f([1,2,3])
```

### Nim Version

% nim -v
Nim Compiler Version 2.0.14 [MacOSX: arm64]
Compiled at 2025-01-06
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: bf4de6a394e040d9810cba8c69fb2829ff04dcc6
active boot switches: -d:release


### Current Output

```text
/Users/etan/Documents/Repos/nimbus-eth2/vendor/nimbus-build-system/vendor/Nim/lib/pure/collections/sequtils.nim(1024, 13) Error: cannot evaluate at compile time: i`gensym0
```

### Expected Output

```text
Successful compile, no output
```

### Known Workarounds

- wrap `toSeq` / `mapIt` invocation in another `proc` then assign the output of that `proc` to the `const`
- use `let` instead of `const` and put the `const` at caller site

### Additional Information

_No response_