removed unnecessary open of pack index on pack.close

This also caused an exception when index was opened on a broken repository.