branch:BranchForeach: Correct handling of the ListFlags