No need to assign $name twice
Issue #1915418 by mkalkbrenner: Unable to index a node bundle in a dedicated index / environment
Issue #1953976 by mkalkbrenner: avoid use variable_set() in anything related to indexing content (because of performance)