The Trump administration hastily canceled research grants last year—but just hit a roadblock in court.