In toHsType, filter out kind variables

(This fixes #8563)