Fixed a name error that may appear in rare indexing cases.