Check lambda bound name is valid

Can't bind a name that is the same as a global type constructor name.
This can lead to mysterious errors if unchecked, particularly with
dependent pair types.

Fixes #704