It’s an old time bug in AE, if you perform an analysis you end up using the a different code path than the actual rendering of the effect, where effects before including masks are not applied. For our tools that do things like that, we check if there is an effect applied before us and put up a pop up telling that to user (and the only solution is precompose), but makes me think we should also look if someone has masks applied to warn user.
Pierre
revisionfx.com