Backport #476 on 1.8.x
Abort and cancel should set cancelled early, close #477