Falcon 1 flight 3 failed when propellant vaporized in the detached first stage's engine, causing it to slam into the second stage. Has this happened to any other launch vehicle? Do launch vehicles usually have design features intended prevent this?
First, the reason this happened was mostly because the engineers didn't expect it. They'd switched from ablatively cooled engines to a regeneratively cooled engine, and weren't expecting it to continue producing thrust after engine cutoff. In order to avoid this causing issue, one simply needs to wait longer between MECO and stage-separation.
A similar incident occurred with the British rocket, Black Arrow, although the recontact did not lead to a launch failure in this case:
Just over a minute after the third stage had burned out, the payload was released, and gas generators were used to push the spacecraft and spent upper stage apart. The delay between burnout and separation was intended to reduce the risk of recontact between the upper stage and payload due to residual thrust. Despite this, following spacecraft separation on the R3 launch, the upper stage collided with the Prospero satellite, damaging one of the spacecraft's communications antennae; however the spacecraft was still able to successfully complete its mission.
There is also the Japanese N-1 launch 5: "...there was recontact between the satellite and the third stage, which caused the satellite to fail..." however I couldn't find more specifics on what exactly went wrong here.
In terms of engineering solutions to prevent recontact, proper timing or a "smarter" approach that utilizes sensor data are common, but also additional hardware like ullage motors or interstage structure could be used prevent this problem.