Child hides behind parent for some reason

My player character class has a MovieClip in it called “graphic”.

At a certain point the player gains an ability, which should be visually made clear by a graphic that’s placed over the existing graphic.

So I’m using:

graphic.addChild( abilityGraphic );

I’m having a lot of problems with this…

It works fine until “graphic” changes its frame. Changing to some frames doesn’t seem to matter but everything after 20 appears to be problematic.

When it happens ( using graphic.gotoAndStop( 23 ) for example ) the child graphic (abilityGraphic) suddenly swaps to behind it parent (graphic). And it will stay there indefinitely.

Needless to say this is totally unwanted, completely aggrevating and I have absolutely no idea why it is doing this.

Any help would be appreciated.