If it is a debt you owe the company, you still owe it. The precaution is good qualification and an appropriate interest rate based on risk to price comparable loans at a rate where the estimation of profit exceeds the estimation of loss. That's how banks make a profit.
Insolvency is defined both in terms of cash flow and in terms of balance sheet in the UK Insolvency Act 1986, Section 123, which reads in part:[1]
123. Definition of inability to pay debts
(1) A company is deemed unable to pay its debts - [...]
(e) if it is proved to the satisfaction of the court that the company is unable to pay its debts as they fall due. This is known as cash flow insolvency.
(2) A company is also deemed unable to pay its debts if it is proved to the satisfaction of the court that the value of the company's assets is less than the amount of its liabilities, taking into account its contingent and prospective liabilities. This is known as balance sheet insolvency.