I ran into some unexpected behaviour while adding 'use strict' to a working program.
I highly doubt that adding 'use strict' lead to unexpected behaviour. From the description of the problem, it looks to me that you added a 'my' that caused to problem you experienced. 'my' and 'strict' are two different things. You can use lexical variables without having any strictness enforced (just like you can drive the speed limit even without the police nearby!), and you can have strictness enforced without having any lexical variable in your program.
But what I really wanted to ask is Why? What's the point of adding 'use strict' to a working program? 'use strict' is a development tool. A useful one, but starting to use it on a working program adds, uhm, nothing. OTOH, it might prevent your program from compiling, inviting you to modify the program, which might cause all kinds of bugs to creep in.
Abigail