Error when closing a toast with the button

When closing a web toast with the [x] the following exception occurs. When it closes by itself there is no problem.

ERROR
Uncaught TypeError: Cannot read properties of undefined (reading 'GetCount') | TypeError: Cannot read properties of undefined (reading 'GetCount') at Object.DoHideToast (http://localhost:8000/GAShopApp/GAShopApp_1_0_530.js:72207:43) at Object.HandleClose (http://localhost:8000/GAShopApp/GAShopApp_1_0_530.js:72198:14) at HTMLButtonElement.cb (http://localhost:8000/GAShopApp/GAShopApp_1_0_530.js:238:26)
at http://localhost:8000/GAShopApp/GAShopApp_1_0_530.js [72207:43]

The stack is

Uncaught TypeError: Cannot read properties of undefined (reading 'GetCount')
    at Object.DoHideToast (WEBLib.Toast.pas:423)
    at Object.HandleClose (WEBLib.Toast.pas:462)
    at HTMLButtonElement.cb (rtl.js:233)
DoHideToast @ WEBLib.Toast.pas:423
HandleClose @ WEBLib.Toast.pas:462
cb @ rtl.js:233

This is probably because the container was on a popup form and was destroyed before the close. Might be worth just trapping for that.

Can you send a sample source project demonstrating this so we know exactly what happens as we could not reproduce this here with the demo or our internal test apps.