Fix performance regressions due to non-inlining of ufunc kernels