This has been brought up in one or more threads before. The issues here is that KoL is not sending out a charpane update after the Rotting Matilda adventure (from my experience, this is not a random thing; it always fails). I've verified that these lack of charpane updates occur without mafia, and in browsers I've never used mafia with. When I submit bug reports, they keep insisting this is some browser issue of mine, but I've done everything that is supposed to resolve it and it never gets any better.
So if RM was your turn 405, mafia still thinks it is turn 404 when it uses the card. Once you get a charpane refresh (say, immediately), mafia sees adventure 405 has already passed, and decrements the counter. Other than finding adventures that the game is currently frequently failing to give charpane updates for and hardcoding mafia to forcibly refresh once it sees them come up, I don't think this is something mafia can fix. Certainly not a mafia bug specifically in my experience.