Fix bug #3698: stack overflow due to eta+canonical structures in
unification.