Treat reading from a global variable as an effect.