Merge pull request #16432 from arthurnn/after_commit_run_on_top_level_trans

Fix regression on after_commit in nested transactions.