Hi everyone,
I know, this is centuries old - but I had the same question just now, stumbled across this post and wanted to add the solution that did it for me. Just in case someone else has that issue in the future.
While John was absolutely right about how to choose the take to actually use when playing back, I believe the original question was about why the old MIDI notes are playing back while recording another take. You have to choose "Replace" also. Otherwise "Takes to layers" behaves similar to "Record Mix" while recording - although you still can choose the desired take afterwards.
Why it only behaves like that when recording MIDI, not with audio, I don't know. But leaving "Replace" always on when using "Takes to layers" - even with audio - doesn't hurt anyways, so I just leave it active all the time.
atb, Mart