Say for instance that a player has four thuds. Two things will incur the bug:
1.) Player types .take, and obtains five or more thuds
2.) Someone uses the H menu and gives this player five or more thuds
Nothing happens immediately, the player can still build thuds, however! If his total number of thuds drops below five, he can no longer build them (unit limit type reached).
This is how I understand it to work at least - I might not be exactly right, but I hope this points someone in the right direction to possibly fix this rather serious bug!
