Make case-lambda correctly typecheck more interesting cases.

Also doesn't typecheck dead code based on case-lambda branches never
taken.

Closes PR 12973.