The term `(λx. λy. x y) y` should be reduced to `λz. y z` instead of `λy. y y` to avoid name collisions. 
The term
(λx. λy. x y) yshould be reduced toλz. y zinstead ofλy. y yto avoid name collisions.