Fix resizing the index array No longer segfaults when resizing an empty array. Signed-off-by: Vicent Marti <tanoku@gmail.com>