Regression from v2.0.10 to `version-2-0`: `Error: fatal error: invalid kind for lastOrd(tyGenericParam)`; works in 2.2/`devel`
### Description

`m.nim`:
```nim
proc n*[N: static int; T](x, y: array[N, T]) = discard
```

`c.nim`:
```nim
import ./m
proc n[T: array](a, b: T) = discard
n([0], [0])
```

### Nim Version

Builds:
`v2.0.10`
```
Nim Compiler Version 2.0.10 [Linux: amd64]
Compiled at 2024-10-05
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: e941ee15be775fe3c46db1bed9b4f41c7dfb1334
active boot switches: -d:release
```

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

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

`devel`:
```
Nim Compiler Version 2.2.1 [Linux: amd64]
Compiled at 2024-10-04
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 7dfadb8b4e95d09981fbeb01d85b12f23946c3e7
active boot switches: -d:release
```

Does not build:
`version-2-0`:
```
Nim Compiler Version 2.0.11 [Linux: amd64]
Compiled at 2024-10-04
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 3c66401dee9cfcfca17ab0ca77e909ed9ac6f862
active boot switches: -d:release
```

### Current Output

```text
Error: fatal error: invalid kind for lastOrd(tyGenericParam)
```


### Expected Output

_No response_

### Known Workarounds

_No response_

### Additional Information

Presumably related to https://github.com/nim-lang/Nim/commit/3c66401dee9cfcfca17ab0ca77e909ed9ac6f862 which is the only commit besides https://github.com/nim-lang/Nim/commit/ff46fcfd241b162faea4ca833c14b3e46798d2e9 by which `version-2-0` currently differs from `v2.0.10`.