There's a bug that seems to exist even in vanilla DK2 where Imps will consistently prioritize dropping Gold off at the Dungeon Heart instead of a Treasury, even if the Treasury is closer. It can be a pretty severe bug as Imps will actually keep depositing Gold at the Dungeon Heart even if it's full, resulting in loose gold on the DH tiles similar to if you dropped Gold on a full DH or Treasury manually.
The problem is that the DH room tiles don't have the same special properties as the Treasury, properties that the Casino also shares. Gold on Treasury / Casino tiles seems to be hardcoded so that it cannot be picked up by anyone but Imps, and this is how the Casino functionality with the Rigged setting works essentially to prevent creatures from just picking the Gold back up. This actually results in another bug where if a creature is knocked unconscious on a Treasury or Casino Tile, they'll drop all their gold. So as a result of the Dungeon Heart not having those special properties, any creature, especially and most problematically a new creature as the portal is usually close by, can pass by and just pick up the gold. This is a pretty big bug that can go unnoticed, resulting in hefty losses of gold.
The bug seems to occur within specific Imps' AI, as I've had both Imps that act 'normal', preferencing the Treasury over the Dungeon Heart, and those that are 'special' or 'retarded' and will consistently drop gold off at the Dungeon Heart even if it's full. In my experience, killing off the bugged Imps seems to actually fix the issue. Additionally, it seems to be the same maps that have the issue. I can't name official maps as it's been so long since I've tried them, but in my remake of Level 11b within my balance patch / mod, the bug does seem to consistently occur. Most official maps also seem to give the player way, way more gold than necessary and vanilla DK2 creatures are cheap, so it's also easy for the bug to go unnoticed there.
So I'm basically looking for any information on this bug so I can figure out a way to work around it. For anyone who catches this bug, does it happen on the same map with a set of Imps or is it all Imps? Does sacking then replacing the bugged Imps make it better? Does it make a difference if sacked / replaced before and after a Treasury is built? Maybe the room they're spawned on? If you're a mapmaker, maybe try removing any starting Imps and see if that does anything. Any consistent pattern across bugged maps, like Dungeon Heart layout? Finally, what version do you use?
These questions also do reveal my current theory on what might cause the bug, but I haven't confirmed it yet so I still want to experiment. Maybe others can experiment as well. I'm not sure if version even matters because I've found a few bugs that exist across all versions, this could just be another thing that went unnoticed.