Adjust scheduler isCancelled, see #2903

* isCancelled shall return false if the task is expired (run)
  before cancel() is performed