Hard to say, but I wouldn't be surprised. loadscr does a lot of stuff, and there's no telling what might result from changing out data while other parts of the program are using it.
The easiest thing to do would be to increase the size of tmpscr by one and load to tmpscr[2] instead.