Despite the defeat of historic proportions, the prime minister's aides intend to resuscitate the Brexit deal.