I don't think you've understood the story you're commenting on.
These people weren't "flagged" as terrorists, they were convicted and sentenced (extremely) harshly.
There’s literally no comparison between “flagging”, which has no legal requirement or no actual consequence without actual trial, and the results of an actual trial.