Appeal likely as Scottish court sides with PM in latest Brexit wrangle