But it doesn't make sense that me being denounced by, for example, Montezuma, would bother Hiawatha, who I'm friends with (DOF and all) and hates Montezuma too.
That's exactly the sort of thing the system should avoid (and in my experience usually does), since you get a lower negative for being denounced by someone's enemy or with a civ you're friends with, plus the positive for being friends with them (which itself will usually require other positives in order for them to want to be your friend in the first place). You'd normally need to have a lot of people, including those Hiwatha is neutral or friendly towards, to prompt Hiwatha to denounce you. Remember that that 20 value is the highest possible for denunciation, not the default. That suggests it's only going to be that high with civs that already dislike you, it's not even the default value for a neutral civ. If you're friends with someone, they'll assign less of a negative modifier, and if they hate the denouncer, less again. I don't know the figures involved in these other modifiers, but it suggests that a single denunciation should have very little effect on your friends' relations with you, unless they have a reason to want to placate the Aztecs by siding with Montezuma.
What could happen is that Hiwatha doesn't care about Montezuma's denunciation, but Montezuma's denunciation may have prompted (or may have been prompted by) denunciation from a civ towards whom Hiwatha is closer to neutral or friendly, which might change Hiwatha's attitude. Even that should be rare, though, as a civ that's friends with Montezuma is less likely to also be friends with Hiwatha.
It was fairly early in the game; classical era or so. We were somewhat on the same par on score, and I did nothing to anger Hiawatha.
But Hiawatha didn't seem to be angry about me being denounced (not even after the DOF), but it's quite dumb that I get a diplo hit for him because I got denounced by a maniac (who both of us hates).
Was he a neighbour, and did you check the tooltip for his modifiers? In my experience, Hiwatha loves to claim your territory even if he's on the other side of the continent. You can placate him with time and a bit of work, but remember that "They want land that belongs to us" is a very significant negative, and Hiwatha appears to be one of the personalities who places a lot of stock in it (so chances are you'll usually get a high negative from it). I think it may be that this should be tweaked to be a weaker modifier, rather than the denunciation system or the modifiers relating to it.
Also, I'm uncertain how much of an AI's decision is based on the straight modifier system, and how much on their other interests. For instance, the modifiers may tell the AI it's friendly towards you and therefore it won't want to denounce you, but maybe its score or military advice is telling it that it really, really doesn't want to antagonise Montezuma, particularly if it already hates him - it may be trying to avoid war with a more dangerous power, or at least one that it calculates is more likely to be a threat due to existing bad relations. If the AI does indeed juggle these sorts of competing interests (i.e. competing sets of modifiers) it would explain why it can sometimes be erratic. It might also explain why Hiwatha was still friendly with you despite denouncing you.