mgu recording positions of subterms in its second argument