Fix decrement issue with BranchOnCount simulation