No, because it is simply impossible, but as always in After Effects - there are ways around this:
Add a solid above the layer you want to mask.
Create the mask on that solid instead of on the layer itself.
Set the "Track Matte" of the layer to "Alpha Matte"
Apply the track to the solid with mask.