EU court throws out challenge to anti-terror rule