Better unification errors when name is out of scope
In particular, a unification problem which cannot be solved because it
uses a variable not in scope where the metavariable is bound.
Fixes #342