As you point out, are there any circumstances where the form fails to load e.g. its .Init() returns .F.?
Some forms managers, when asked to open a form, check to see if an instance is already running. If so it will switch to that instance rather than open another one. Could something like that be happening? In that case the code might be assuming it always gets a new instance assumed to be at a new (latest) array entry, which in fact doesn't exist because a previously opened instance is being used instead.
When checking if an object exists i.e. gaSession[x], you may need to check for it being NULL as well:
https://www.foxite.com/archives/determine-if-object-exists-0000025852.htm
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up