While playing around on my Wilbur save file I had to constantly pick up the grass and twigs that were tossed to me by my Prime Ape friends. Later I would be trying to manage my inventory space, and I would frequently find two separate stacks for twigs and grass each that were not full stacks. I started watching for it and saw that despite the fact that some grass or twigs were going correctly into a small stack of grass or twigs, at a seemingly random point the auto-stacking would stop trying to fill up my current stacks and create a new stack in my inventory instead and begin to fill only that one. I would have around 30 grass at times and it would create a new stack before reaching 40. This happened just about every time I went to pick up a large amount of grass and twigs.
While holding down the spacebar button to pick up a lot of grass and twigs, I would frequently find auto-stacking trying to create new stacks of grass or twigs instead of filling the current stacks it was working on.