if you dont know what you are walking into then either stay away, and or negotiate and have them include a 2-4 year warranty that will cover the engine (make sure that issue is specifically covered) in the new price..
if the car ran good, it might not be all that much of an issue, but i drive broken cars a lot and have a lot of experience.
for $4000, it seems like you could find an aveo without the issue easily.. maybe not?