Empty sequence is of type unit (cf #139)
Added debug and fixed loop in unify