Fixed bug with an empty array of index items causing a crash.