fix segfault when index into packed geometry ran out of bounds