Authortime mask inaccessible at runtime. Mask property null; child objects unexpected

I created an Icon symbol that contains a sprite sheet (Bitmap) with icons on the masked layer, and a plain old rectangle on the mask layer.

At run time, the object’s mask property is null. In fact, the object contains only two children, both of which are of type “Shape”, so I don’t even know how it’s displaying the masked bitmap.

This issue is preventing my “hasMaskedContent” method from functioning, and I need it to function in order to know whether I need to call my second method “getVisibleBounds”.

The “getVisibleBounds” method serves to get the boundaries of a masked object. It does so by using by using the getColorBoundsRect method of the BitmapData object. The size of a masked object must be determined that way, because the width/height/getRect/getBounds properties and methods return the wrong values, reflecting either size of the entire unmasked content or some portion of it clipped to the origin.

In order to know whether to call “getVisibleBounds”, I first call a method named “hasMaskedContent”, which leverages a display list enumerator (non-recursive, depth-first processing, extends Proxy class) that allows me to iterate over all descendents of a display object and test whether any of them have a mask…

…which leads me to this problem of authortime masks leaving no trace whatsoever. Can anyone explain this?

Here are my methods, by the way, in case anyone is interested in using them:

[SIZE=1]public static function hasMaskedContent( obj:DisplayObject ):Boolean
{
    if (obj is DisplayObjectContainer)
    {
        var e:DisplayListEnumerator = new DisplayListEnumerator( obj as DisplayObjectContainer );
        for each (var c:DisplayObject in e)
            if (c.mask != null)
                return true;
    }
    return obj.mask != null;
}

public static function getVisibleBounds( source:DisplayObject, clip_to_origin:Boolean = true ):Rectangle
{
    var bounds:Rectangle = source.getBounds( null );
    var matrix:Matrix = new Matrix();
    matrix.tx = -bounds.x;
    matrix.ty = -bounds.y;

    var data:BitmapData = new BitmapData( bounds.width, bounds.height, true, 0x00000000 );
    try
    {
        data.draw( source, matrix );
        bounds = data.getColorBoundsRect( 0xFF000000, 0x000000, false );
        bounds.x -= matrix.tx;
        bounds.y -= matrix.ty;
        if (clip_to_origin)
        {
            if (bounds.left < 0)
                bounds.left = 0;
            if (bounds.top < 0)
                bounds.top = 0;
        }
    }
    finally
    {
        data.dispose();
    }
    return bounds;
}
[/SIZE]