Index.equals() method had missing "!" in instanceof check