If it gets to the SCOTUS, we may be surprised. Given some of Robert's recent decisions, I wouldn't make book on a proper and constitutional ruling.
I think there's a good chance Ginsberg would vote in Flynn's favor. She has, for all her leftist bias, been pretty consistent on separation of powers. It wouldn't be the first time she's spanked a lower court, against left wing interests, in cases where the judge was this egregious in overstepping judicial bounds. Except for abortion cases anyway.
My bet, if it goes to SCOTUS, is 6-3 or 7-2 in Flynn's favor. Sotomayor and Breyer are likely locks against. Kagan is likely againt. But Ginsberg, Roberts, and the 4 conservatives are probably locks for Flynn.