Move environment cache to locals tracker, which is per module