CLN: cache indexers in internal_names_set (reported GH5727)

closes #5727