Note: Blogger doesn't give me a good way to preview the image before it goes live. If it is too small, my apologies. I'll try to get that fixed before your news reader pulls the feed.
At first I thought the third definition of MyFunc would wipe out the others. And just to verify that declaring a function in that manner normally makes it into the assumed contexts, I did it with YourFunc.
Go ahead, take a guess...
The interpreter evaluates standalone functions before the other expressions. So it is as if 'function MyFunc...' were written before everything else. This can be verified by calling MyFunc() in the first line of the script. The expressions (which include assignments) are then evaluated. So what appears as the second assignment of MyFunc is really the third, and the third is really first.