It depends how the unit was destroyed. If a unit of Veterans of the Watch attacks a unit of Sworn Swords with Greatjon Umber, dealing enough wounds to destroy it, the night's watch player is active so Take the Black is played first, removing Greatjon from the unit so that Last Stand does not make the Sworn Brothers vulnerable.
If instead those same unit of Sworn Swords attacked the Veterans of the Watch and suffered enough wounds from the Counterattack order to be destroyed, the Stark player is active so Last Stand is played before Take the Black so the Veterans become vulnerable before suffering the attack. Even if the attack wipes them out, it would be pointless to use Greatjon's Overrun since the Sworn Swords have no remaining ranks to make a charge attack with.