Fix for #380, fallback to last open tab when closing tabs

`this` should be `panel`, otherwise it's passing the Tabs object along