#SB-181: When an artifact has been deleted from a repository, remove it from the index

Fixed the ArrayIndexOutOfBounds.