Fix PartitionBySize to equally distribute partitions in edge cases.