Delayed import with forward declared procedure does not create valid C
### Description

```nim
# Module main
proc doThing*()
import sub
proc doThing*() = echo "hmm"

# module sub.nim
import main
doThing()
```

### Nim Version

2.0.8 and devel

### Current Output

```text
error: implicit declaration of function ‘doThing__a_u1’ [-Wimplicit-function-declaration]
   74 |         nimlf_(2, "/tmp/b.nim");        doThing__a_u1();
```


### Expected Output

_No response_

### Possible Solution

_No response_

### Additional Information

_No response_