Fix crash from NamedTuple placeholder by hauntsaninja · Pull Request #18351 · python/mypy

@hauntsaninja

Fixes python#17396

I'm having trouble writing a regression test, but the following
reproduces the issue nicely:
```
rm -rf repro
mkdir repro
mkdir repro/np
echo 'from .arraysetops import UniqueAllResult' > repro/np/__init__.pyi
echo '
from typing import Generic, NamedTuple, TypeVar
from np import does_not_exist

_SCT = TypeVar("_SCT", bound=does_not_exist)

class UniqueAllResult(NamedTuple, Generic[_SCT]):
    values: int
' > repro/np/arraysetops.pyi
touch repro/np/py.typed

PYTHONPATH=repro mypy -c 'import np'
```