Fix the number of dim/broadcast flag computation.