[#891945] Remove events on ended.
Fix Bug 876909 - Pasting trackevents should attempt to maintain the same ordering and not add new layers