Costain loses fight over £320m Welsh road