Check kw function definitions w/o type annotations

Instead of trying to check the expansion as-is (which
always fails), check the core function and reconstruct the
keyword function type.

Closes PR 11253
Handle kw λs when useful annotations are missing

Closes PR 14322