improve nesting of tracing for invalidations (#6886)
### Description
Before stuff that run after the task execution has finished wasn't
accounted towards the task span. This includes cells changes which
trigger a task reexecution.
Now we account these things to the task span too, which improves the
trace reporting
Closes PACK-2193