fixed serious bug in unification of types (there was no checking whether name occurs in assigned term)