I’m sorry, I hadn’t quite understood what you were trying to do. The easiest way to create transparency for an image using a matte source is to:
Add a Bitmap tool to the matte image and set the Channel to Luminance.

Pipe the output of the Bitmap tool into the mask input of the image you want to mask.

In the Mask tab of the Image check the Multiply by Mask button.

You now have an image with the transparency of the matte.

You can use the controls in the Bitmap tool to adjust the matte levels.
There you go. Just one of the approved methods for achieving this.
I hope you don’t mind me saying that although your method works, it’s not one that I would recommend.
Simon Ubsdell
hawaiki