[data][bugfix] mask could not be inverted when Data object was provided in _apply_mask