Move E0379 check from typeck to ast validation Part of #35233. Extension of #35338, #35364. Fixes #35404.