There are rules to be followed when making dismissing people by redundancy. Rules about recruitment and how and when you are allowed to recruit into a position of the dismissed person.
I looked into this a couple of years ago, and much to my surprise (as I too thought this was the case), I found no evidence whatsoever that there is any such law on the UK statute books.
Happy to be proven wrong, but I do not believe there is any restriction on re-recruitment into the same position from which someone has just been made redundant; the rules cover instead re-recruitment of the same person, and tax avoidance by both company and individual of the tax-free "severance".