I suppose this is a race condition. While the user intearcts with application, some timers may expire, animations are running or pending signals are delivered, the corresponding operation may interleave. Let's image the situation of a menu with some CLOSE menu item and an integrated timer to automatically close the menu. It is possible, that the user activates the CLOSE item just in the same moment when the timer expires. Accordingly the methods associated with the CLOSE item and the timer are executed. If both perform the same operation, e.g. EndModal(), the first method succeds and the second fails, since the affected group is not modal anymore. Similar happens when you add/remove one group. Doing this twice will end in an error case.
What you can do?
Wherever such race condition is possible add additional if-condition to the begin of the respective method to test whether the affected group is really modal, visible, etc. You can, for example, test the variable Owner of the affected group. If Owner is null, the group is already removed:
// If Screen is already 'closed' exit immediately
if ( Screen.Owner == null )
GetRoot().EndModal( Screen );
Root.Remove( Screen );
Hope it helps you further