The president gets a rare legal win in his failed attempts to move the case into federal jurisdiction