Backport the FastChain pile-up flag fix to the 24.0 branch.
/cc @mbandier, @schaarsc, @jchapman, @tadej