I'm learning from the 1998 version of "Lectures on the Curry-Howard Isomorphism" book, since it's freely available online (https://disi.unitn.it/~bernardi/RSISE11/Papers/curry-howard.pdf) as opposed to the newer version. If you are not familiar with this version of the book, but you have some experience with the topic, that's fine, I've only read the first few pages of the book so you can help.
The book goes a bit differently than the standard literature on the subject and first defines the concept of pre-terms and only after that defines the concept of $\lambda$-terms. I understood definition 1.1.13 on page 3, of the substitution of $N$ for $x$ in $M$, where $N$ and $M$ are pre-terms, but I have a problem with definition 1.1.22 in page 5 for $\lambda$-terms. It seems like the definition doesn't address every possible case, am I'm wrong? I thought that that's just a typo mistake, as they also mistakenly wrote in the beginning of this definition $M\{x:=N\}$ instead of $M[x:=N]$.
So I assumed they meant an equivalent definition to that for pre-terms, just like definition 1.1.20 of free variables of a $\lambda$-term is the same as definition 1.1.11 of the free variables of a pre-term. But now I'm confused, because in example 1.2.4(i) in page 6, they write $$(xx)[x:=\lambda z.z ] = (\lambda z.z)\lambda y.y,$$ but shouldn't it be $$(xx)[x:=\lambda z.z ] = (\lambda z.z)\lambda z.z?$$ If someone understands what's going on here, I would appreciate their help.