adjust contour to track edit sequences better

Specifically when there is no delegate and an edit
sequence is started, track that differently in case
a delegate is set before the edit sequence ends
(in which case we don't want to end the edit
sequence in the delegate since we didn't start it
there)

related to PR 13491
(cherry picked from commit 405e51bb053c5bce7b972d47706ab81ac136edd7)