I'm trying to find patterns. So far it only seems to happen when dropping items into a container without opening it, and only certain items. It also doesn't affect the weight of the stack when the items are duplicated. I had a stack of over 80 fish that only weighed one stone. So far I've duplicated gems, coins, some food, keys (this was the first clue something was up), lantern oil... I couldn't get it to work on the flying potion in level 2, or some of the other potions and scrolls. I haven't tried duplicating explicitly non-stackable items like equipment yet.