  The widely used MASTER approach for angular power spectrum estimation was
developed as a fast $C_{\ell}$ estimator on limited regions of the sky. This
method expresses the power spectrum of a masked map ("pseudo-$C_\ell$") in
terms of the power spectrum of the unmasked map (the true $C_\ell$) and that of
the mask or weight map. However, it is often the case that the map and mask are
correlated in some way, such as point source masks used in cosmic microwave
background (CMB) analyses, which have nonzero correlation with CMB secondary
anisotropy fields and other mm-wave sky signals. In such situations, the MASTER
approach gives biased results, as it assumes that the unmasked map and mask
have zero correlation. While such effects have been discussed before with
regard to specific physical models, here we derive a completely general
formalism for any case where the map and mask are correlated. We show that our
result ("reMASTERed") reconstructs ensemble-averaged pseudo-$C_\ell$ to
effectively exact precision, with significant improvements over traditional
estimators for cases where the map and mask are correlated. In particular, we
obtain an improvement in the mean absolute percent error from 30% with the
MASTER result to essentially no error with the reMASTERed result for an
integrated Sachs-Wolfe (ISW) field map with a mask built from the thresholded
ISW field, and 10% to effectively zero for a Compton-$y$ map combined with an
infrared source mask (the latter being directly relevant to actual data
analysis). An important consequence of our result is that for maps with
correlated masks it is no longer possible to invert a simple equation to obtain
the true $C_\ell$ from the pseudo-$C_\ell$. Instead, our result necessitates
the use of forward modeling from theory space into the observable domain of the
pseudo-$C_\ell$. Our code is publicly available at
https://github.com/kmsurrao/reMASTERed.
