Backport 3497

In some cases a negative axis argument to np.insert would result
in wrong behaviour due to np.rollaxis, add modulo operation to
avoid this (an error is still raised due to arr.shape[axis]).