The discharge or devise in a will of any debt or demand of the testator against the executor or any other person is not valid against creditors of the testator, but is a specific devise of the debt or demand. The debt or demand shall be included in the inventory. If necessary, the debt or demand shall be applied in the payment of the debts of the testator. If not necessary for that purpose, the debt or demand shall be distributed in the same manner and proportion as other specific devises.