added  functionality to allow negative `loc` values to work with `Index.insert`