SI-7636 Fix a NPE in typing class constructors

If we encountered an erroneous super call due to a
failure in parent type argument inference, we must
avoid inspecting the untyped children of erroneous
trees.

Slight modification of #2731

Review by @cvogt