`{.emit.}` quoting doesn't capture symbols and parameters inside a template
### Description

`{.emit.}` quoting doesn't capture symbols and parameters inside a template
```nim
template quoteWontCapture*(data: int, body: untyped) =
  var status: int
  #{.emit: [status, " = ", data, ";"].}
  {.emit: "`status` = `data`;".}
  if status != 0:
    body

proc main() =
  var x = 10
  quoteWontCapture(x):
    echo "hello world ", x

when isMainModule:
  main()

```

### 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
~/.cache/nim/bug_emit_d/@mbug_emit.nim.c: In function ‘main__bug95emit_u6’:
~/.cache/nim/bug_emit_d/@mbug_emit.nim.c:160:25: error: ‘status’ undeclared (first use in this function)
  160 |         nimln_(5);      status = data;
      |                         ^~~~~~
~/.cache/nim/bug_emit_d/@mbug_emit.nim.c:160:25: note: each undeclared identifier is reported only once for each function it appears in
~/.cache/nim/bug_emit_d/@mbug_emit.nim.c:160:34: error: ‘data’ undeclared (first use in this function)
  160 |         nimln_(5);      status = data;
```


### Expected Output

```text
hello world 10
```


### Known Workarounds

using array capturing instead works as expected:
```nim
{.emit: [status, " = ", data, ";"].}
```

### Additional Information

_No response_