Sorry to answer so late, but I don't receive any notification, if anyone answers to my posts!
If I describe the problem as a general bug, you can reproduce it with any sketch (with Teensy 3.6)!
I think, it is a bug in the stack maintainance.
You know, the memory for local variables is reserved on the stack, while the memory for static variables is reserved in the data area, where global variables are located.