Thanks for posting this, I had the same question about replaygain for AAC (.m4a) tags. This was driving me crazy. I can confirm that changing the tags like REPLAYGAIN_TRACK_GAIN to lowercase replaygain_track_gain indeed fixed the problem.
Is the final answer that we should convert AAC REPLAYGAIN_* tags to lowercase? That's non-standard, so it would be nice if we didn't need to do that.