Appeals court sides with Justice Department in Trump lawyer fight