Probably not a huge issue, but it just feels like 'invalid' isn't behaving the way it should in this case.
This appears to stem from a fundamental misunderstanding of what marking a flag as "invalid" actually means. In reality, all it means is that the moderator who processed your flag thought it was useful and accurate, data which is accumulated and used to rank your future flags in the moderator flag queue in accordance with your past flagging history. That is to say, flag weight only has meaning to the moderators who process those flags, and therefore, they are the only ones who get to mark flags as valid or invalid.
The question you cite above was not closed by a moderator. It was closed by 5 regular users who have close vote privileges. What happened here is that the moderator who processed your flag deemed it invalid and did not take any action. That, of course, doesn't keep other community members from thinking the same thing you did and taking action of their own, but that action cannot and should not affect how your flag is marked.
And for what it's worth, I disagree that a flag should be automatically marked as valid or invalid even depending on the action taken by the moderator who processes it. There are plenty of cases where a moderator will decline to take action on a flag, but still mark it as valid. And there are at least a couple of cases where they would conceivably mark a flag as invalid, but still take action. Automating this makes flag weight virtually useless, as it takes its control out of the hands of those it is designed to assist.
The answer here is the same refrain that's been repeated dozens of times already here on Meta:
Flag weight doesn't matter as much as you think it does. Your life will be so much better if you spend less time obsessing over flag weight and the various things that make it rise and fall.