Duplicate instance names

I haven’t seen much to explanation of this in any Flash documentation,
but maybe someone knows more about this. Initially I was trying to
fix a buggy application. The app is fixed now, but I’m still curious.

I have an app that defines some object instances (buttons and movie clips)
in various frames and on various levels of a timeline. For any object that
needs to be manipulated by AS, I give it an instance name.

However, there’s no safeguard against giving several instances the same
name. So, I experimented with giving two buttons, on different
layers and different frames, the same instance name (“playbtn”). Then I defined an event handler:

playbtn.onRelease = function () {
gotoAndPlay(1);
}

Turns out that the resulting app runs, but only one of the buttons is enabled. It’s not clear what rule decides the “winner”. I didn’t try every combination of frame/layer precedence.

Does anyone have any insight into how ActionScript 2 deals with instance
names? Is there a way to reference an particular frame or layer when
accessing an instance, or only by its name? And is there a documented
look-up order?