midx: fix segfault with no packs and invalid preferred pack