Fix to #py-13969

This one took me hours and hours to debug :O

`getPsi()` is a class instead of a file if a class is nested, and we do not get a fully-qualified name, but we should since sub class definitions are not more "volatile" than class definitions.

This fix appears to work, but I'm not super-familiar with the codebase so please point out any problems.

I sincerely hope that this can be reviewed soon, a lot of my projects depend on it.