Cleanup kw/opt lambda annotations.
Make kw/opt lambda special checks work with other expected values.

Closes PR13544.
Reduce unnecessarily complicated restrict case.
Fix type of split-at and vector-split-at.

Closes PR12700.