A lot of mods use the CreateEntityInCargo and CreateInInventory methods, which both can spawn items inside the Cargo of other items. CreateInInventory uses the FindFirstFreeLocationForNewEntity method to find a suitable location
Some mods have either large items like weapons, which are wider than 10 slots or the player would have space for the item, but only if it was rotated.
So please add another check if the item might fit into the cargo if it was flipped and then spawn it. There is currently not really a good way of doing these checks manually in the script, without reimplementing the whole search algorithm to find a free spot