Impose an ordering on the BH that are merging in a chain.
Impose an ordering on the BH that are merging in a chain. A BH that is itself being swallowed cannot be swallowing something else.
This solves the issue by always imposing the order irrespective of the order in which the tasks were executed.
I have tested it on my stand-alone debugging test case but it would be great to see whether it solves also the actual original issue you had.