Dynamic ComboBox is giving negative depth to attached MovieClip?

Hi guys, I’ve got this new problem where I’m trying to remove a container movieclip i’ve attached the first time the function is run, but I try to remove it and replace it again, but the second time around it gets a negative depth and all goes to hell. any ideas??



function populateBasket(){
    trace("B4 REMOVE:" + basketRows.loader.container.getDepth());        
     basketRows.loader.container.removeMovieClip();

    trace("AFTER REMOVE:" + basketRows.loader.container.getDepth());    
    basketRows.loader.attachMovie("~container","container", 0);

    trace("AFTER ATTACH:" + basketRows.loader.container.getDepth());   

    for(i=0;i<items.length;i++){
       var myMC = basketRows.loader.container.attachMovie("~basket_row","row" + i, i);
       myDropDown = myMC.cbcontainer.attachMovie("ComboBox","qtyCB", 0);
       myDropDown.setSize(43,22);
       myDropDown.addItem({label: "1", data: 1});
    }
};
                                    
populateBasket();

mybtn.onPress = function(){
    populateBasket();
};


output when swf loads:
B4 REMOVE:undefined
AFTER REMOVE:undefined
AFTER ATTACH:0

output when I press the button:
B4 REMOVE:0
AFTER REMOVE:-32769
AFTER ATTACH:-32769