I just updated to Stata 15 and now a code I consistently use is broken. Have I overlooked something here, or did Stata 15 change loops?

Here is the code:

global xlist e1-e8
foreach var in $xlist {
recode `var' (1/2=1) (3=2) (4/5=3), gen(`var'_net)

However, I get this error message:

variable e1 already defined
r(110)
Previously, it would just create new variables for e1-e8 with "_net" at the end of each variable. Now it won't. Any advice?