Get rid of environment macro counter in favor of a global one