da2d323018
Post-sort holes were caused by the planning phase, not the execution phase. When GetContainerItemInfo/Link transiently returns nil for an occupied slot during server lag, CreateBagFromID marks it <EMPTY>, the sort algorithm moves real items into that "destination", and we end up with literal gaps where the misclassified items used to be. Validate the read against GetContainerNumFreeSlots before sorting; if counts disagree, print a chat warning and abort instead of corrupting the layout. User retries after a moment.