Building some applications causes whole system to crash (out of memory)
### Description

Note: [Original Issue](https://github.com/nim-lang/nimble/issues/1284)

When trying to build [Lesson 50](https://github.com/WeebNetsu/nim-learning-material/tree/main/50.%20Nimble/project) using `nimble build`, it will quickly use up all my systems RAM and force me to reboot to get it to respond again. This some sort of leak or maybe unhandled memory usage?

I recorded a video to show what happens, I cancelled the execution before my system crashed of course
https://github.com/user-attachments/assets/368a64ba-bc5e-4269-96f5-23c0ef605944

This seems to be a new issue, since I was previously able to build this without issue - have also been [replicated](https://github.com/nim-lang/nimble/issues/1284#issuecomment-2473686164) by [Patitotective](https://github.com/Patitotective)




### Nim Version

Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 78983f1876726a49c69d65629ab433ea1310ece1
active boot switches: -d:release

### Current Output

```text
It seems to produce this bit of info before taking my system for a ride:

Verifying dependencies for x11@1.2
   Building project/project using c backend
/home/netsu/.nimble/pkgs2/async_http_request-0.1.4-944652f72180b0daac91cd897a466e3a0f7c0625/async_http_request.nim(157, 34) template/generic instantiation of `request` from here
/home/netsu/.choosenim/toolchains/nim-2.2.0/lib/pure/httpclient.nim(1154, 14) Warning: Deprecated since v1.5; use HttpMethod enum instead; string parameter httpMethod is deprecated [User]
```

Crashes my system before much else is displayed
```


### Expected Output

```text
Application should build an executable without crashing the system
```


### Known Workarounds

_No response_

### Additional Information


In case important:
OS: OS: EndeavourOS (Arch Linux)
CPU: AMD Ryzen 7 5700X (16) @ 3.400GHz
RAM: 16GB
nimble v0.16.1 compiled at 2024-10-02 02:00:57