Fix mysterious "no such variable" bug