make_inverse_mask moved to support.py