Fix crash-on-invalid with inheriting constructor.

Fixes PR16656.