The code is not connected to the object, but to a controller owned by this object. This is a small but important difference. And it is the reason why you get your object by cont.owner.
Now to your script:
NAME = own.name
In script mode:
This creates a script variable NAME that you never use.
It lives as long as the script is executed. It dies with the end of the script run.
In module mode:
This creates a module attribute NAME.
It lives as long as the module lives (until the BGE is stopped).
Be aware in module mode this code is executed once at the first call to a function of this module.
GameLogic.NAME = own.worldPosition
This creates an attribute NAME for module GameLogic.
It lives as long as the <i>module GameLogic lives</i> (until the BGE is stopped).
So it works as it should be. There is nothing to fix.
Andrew got it :D
I hope it helps