Backport 1.7 3900

Backport #3900: `Ensure NotImplemented is passed on in MaskedArray ufunc's`.