Then `envIdxs[getEnvKey(elem)] = i`