I think selling a slave, or fulfilling a quest to send a slave, does not de-assign the slave from that function. I have 1 slot permanently lost from upgrading because of this.