Duplicate child appearing

I do all of my work in flash, so my knowledge of the display list and things like that are pretty tenuous. In the project im working on now, I needed to essentially “swap symbols” and used removeChild() and addChild() to do so. However, this put the children on top of a semi-transparent menu panel that i wanted to be on top. The panel is a movieclip that changes sizes depending on the size of the text in it. Since when its large I always want it to be on top, and its only a problem when the panel goes from small to large I put this code in the frame of the movie clip where it tweens from small to large


MovieClip(root).setChildIndex(MovieClip(root).instructions_mc, ((MovieClip(root).numChildren)-1))

Since it worked I assume this code puts the menu on top. However, this panel is on every frame of the maintimeline. When it goes to another frame on the maintimeline it creates another instance of the menu under the first one (or i suppose the new one could be the one on top). Could setChildIndex() be causing this? If not, what else could be creating a second instance considering the menu mc is placed there in flash not in actionscript (and i already checked if there were multiple instances placed to begin with)