This is an attempt to fix the situation described by https://reviews.llvm.org/D104207#2826290 and PR41508.
See sequence of operations leading to the bug in https://reviews.llvm.org/D104207#3004689
We ensure that the Latch is completely "free" before decrementing the number of TaskGroupInstances.
L is a member of TaskGroup. Hasn't its destructor already run sync?