In #214 we took the easy way, but we should be able to have better error messages if we do this in unification itself, before adding the substitution. Though this depends on how our error reporting is implemented.