Q:

Disallow flagging chat messages from the transcript as offensive

Chat is an instant medium. What's past the first two screenfuls is water under the bridge, off to the transcript to collect dust and very very little google juice.
Chat flags are supposed to be an instant moderation solution to instant messaging problems: broadcast problem messages as fast as possible, to as many people as possible, to reach a solution as quickly as possible. Then instantly deal a swift 30 minutes ban if necessary.
Do you see a pattern here?
The point of the much maligned chat flags is to be swift. And, while you might be in a slow room, with days between each messages, none of that makes sense if the message you're flagging as offensive is five days old.
If you have to find a message in the transcript, chances are it's exhausted all of its potential offensiveness. It's too late. Too much water has passed down the bridge. I agree there should be a way to flag messages that are problematic, but those are exceptional cases looking for exception handlers, and luckily chat.SE has more than three hundred of those.
So here's the simple solution to this problem: replace "flag as offensive" with "flag for moderator attention" in the message menu that appears on the transcript.

If the message is actually old and offensive (or you don't want to enter that room), a moderator can act on it for you.

A:

I would go one step further and not only remove it from the transcript but also apply a time limit. Maybe 15-60 minutes. Could even depend on the activity in that room (high activity: short limit, low activity: longer limit).

