Multiple Masks for Dynamic Element Causing Null Object Reference

Hello.

I have a bunch of objects that each contain a color swatch movie clip. The color swatch contains a bunch of frames, each a different colored rectangle.

The objects that contain the swatch clips also have a mask layer that defines what portion of the color swatch is revealed.

When I have one frame in that mask, everything works correctly. I can change the swatches with no problem.

However, I need to create different frame for the mask. Once I create a second frame with a different mask, I get a Null Object Reference and everything breaks.

I tried creating shape tweens between the frames, making each mask into its own movie clip, and putting each new mask on a different layer - but none of that works.

How can this be fixed?