Get SparsityPattern working with local indices.