My former neighbour bought a low mileage engine from a rolled car for his old Ford. When they fitted the new engine they found out that the cast iron block has a small crack near the engine mount because of the impact.
This is always a danger - the same can be said for a repaired car if the engine has moved in the accident. Unfortunately it is often hard to know before buying it!