Fixed an issue with improperly checking if an array index is set.