Fixed crash #6089 by using information stored in Variable instead of accessing Variable::nameToken