Cyclic proc calls causes infinite memory usage
### Description

```nim
# Forward-declaring procedure (let's call this proc "A")
proc error*() {.raises: [].}

# called in another function (let's call this proc "B")
proc env*(key: string, default: string = ""): string {.raises: [].} =
  error()

# A used before its implmentation
# removing this line fixes the issue
let DESTDIR = env("", "")

# later, A's implementation uses B
proc error*() = discard env("", "")
```

To reproduce, paste the above code into `test.nims`, then run `nim test.nims` while having something like `htop` opened. IMPORTANT: you should press `Ctrl+C` before this freezes your computer. This TAKES IN RAM INFINITELY!  
Remove `let DESTDIR = env("", "")` and try again, the issue should disappear.

(Discovered this issue from https://github.com/FyraLabs/nimsutils/commit/996d390e22f2264e20a97accc9aac66652e760a8#diff-4ef83205176043d82365aa5e90186a2b45de4b2e4a07e4ed3b4c5a1e29cb6dbfR32)

### 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
—————————————————————
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2024-07-12
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 22ba5abd635a1b50c76acb0b80097a663cdf97c9
active boot switches: -d:release


### Current Output

```text
Hint: used config file '/home/mado/.choosenim/toolchains/nim-2.0.8/config/nim.cfg' [Conf]
Hint: used config file '/home/mado/.choosenim/toolchains/nim-2.0.8/config/config.nims' [Conf]

(program runs forever)
```

### Possible Solution

I mean at least this should not freeze the entire computer and should have a recursion limit of some sort?

### Additional Information

On 1.6.20:
```
Hint: used config file '/home/mado/.choosenim/toolchains/nim-1.6.20/config/nim.cfg' [Conf]
Hint: used config file '/home/mado/.choosenim/toolchains/nim-1.6.20/config/config.nims' [Conf]
/home/mado/repos/libhelium.nim/test.nims(4, 3) Error: cannot evaluate at compile time: a
```
Should be unrelated I think.