This is a C++ routine, not a function defined in Neverwinter Script. It's defined in the source code for the game executable. Neverwinter Script is a separate scripting language that makes calls to the actual C++ routines. You can find a list of them in nwscript.nss. But they are implemented in C++, not Neverwinter Script. Since we don't have the game's source code, all we can really do is make guesses about how they work.
I was skeptical of it being related to player coordinates—based on my experience with it, and what I've heard from other modders, I thought it was some sort of resource management issue with the game mistaking a reference to one trigger for another. However, I was able to repeat the issue on the Endar Spire in the same location after moving the door, and I don't believe there is another trigger in that location.
For the record, I encountered the issue during regular play in the enclave, somewhere around the rotunda. I was able to repeat it on the Endar Spire without Trask in the party by warping back to it, and also by controlling a different party member.