well-formedness of a context is not just variable containment, close #394