In the attached debug screenshot, you can see that - according to the CODE_UNIT_STARTED and FINISHED lines, the execution seems to be going like this:
- Record A is inserted
- CODE_UNIT_STARTED: AfterUpdate on Record A
- CODE_UNIT_FINISHED: AfterUpdate on Record A
- CODE_UNIT_STARTED: AfterUpdate on Record A
- CODE_UNIT_FINISHED: AfterUpdate on Record A
- CODE_UNIT_STARTED: AfterInsert on Record A
- CODE_UNIT_FINISHED: AfterInsert on Record A
According to the timestamps in the debug screenshot, the AfterInsert is the last piece to both start AND finish.
I'm aware of the pattern for non-reentrant triggers to avoid recursion, but I almost wonder if that's even what's going on here; If this were strictly a trigger recursion issue, wouldn't the AfterInsert Code Unit Started be the first thing in the debug output w/ the AfterInsert Code Unit Finished being the last? Obviously the code is executing multiple times, but I believe that is a separate thing.