Court of appeals upheld order to ban border forces from keeping minors in hotels