I just read the judgement. It sounds like an 'honest' mistake by an FBI agent in 2004 "tick here if this person should not be put on the TSA no-fly list" propagated for a number of years. It's also possible that there is a second reason why the student is denied a visa in 2009 and 2013 - e.g. that the USA suspects (rightly or wrongly) that she has a family member who is linked to terrorism - and they're expecting her to apply for a waiver and to specifically disclaim that she has any link to terrorism when she next applies to enter the USA. The judgement records that the US government assesses that she poses no threat as a terrorist - so you might expect she'll be allowed to enter the USA if she applies for a visa after 15th April 2014.
The lack of oversight is really troubling though - the judge makes the point that there are non-reviewable actions that can be taken by visa issuing authorities.
It sounds as though no-one in the system has enough information to make an informed judgement, nor enough confidence to overrule a database entry - once there is an entry in a database saying 'terrorist' there is no way to expunge that information, and the consular offices who issue visas trust the databases more than their own judgement.
The consular offices need to be trained to treat the terrorism databases as suspect by default, to assume it's as likely that the database contains a false positive as accurate information. The GAO report in 2006 that found a sample of ~110 records contained 38% errors and the purge of 70,0000 records to less than 34,000 in 2007 should each indicate that the databases are unreliable and that their judgement is necessary and should have priority.