shared: remove unnecessary p.mask entries