Clear undo history after initial populate

Fixes #2095