Move assert(pindexNew) to above where we dereference pindexNew.