Wouldn't advise buying it, stamping the old engine number on a new one is an illegal practice undertaken by many.
People get away with it but it's best to buy a car with engine change that has been updated on the book. The only downside to the legal option is a fall in resale value.