I'm assuming this is a bug because we were told the new storting would fix it (see this thread, middle of the second page in dgl's reply to my question on exactly this issue).
Even with all three sort upgrades, things still aren't stacking efficiently; see this screenshot. This happend while grinding spices. My Spice Rack was full of Allspice, but as I was grinding spices for cooking, a space opened up after the first 100 Hot Peppers were ground and the second 100 Hot Peppers went into the Spice Rack instead of joining the existing open stack.