The U.S. Supreme Court appeared troubled on Tuesday by the broad sweep of a federal law that makes it a crime to give “material support” and “expert advice” to designated terrorist groups.

The law was challenged as a vague or overbroad violation of First Amendment rights. But what seemed to bother the justices most was the assertion by U.S. Solicitor General Elena Kagan that the law would bar a lawyer from writing an amicus curiae brief on behalf of such a group in U.S. courts.