Trump’s actions ... were in line with the law. The problem is that the 1997 ruling is morally repugnant, and its enforcer, the president himself, is highly unpopular and politically clumsy.