EA-61643 - java.lang.ClassCastException: org.jetbrains.jet.lang.psi.JetClass cannot be cast to com.intellij.psi.PsiClass

(cherry picked from commit ecdd37cc44f9beb6870c78c3432b1fddcdab8292)