I don't think that `G->getName()` isn't enough to ensure you always get the right global variable here. I can provide hypothetical counter-examples upon request