I have a proportional gyro turn myblock that fails when played in a longer program. The myblock works perfectly fine when played by itself. The most confusing thing is that the way it fails seems to be random. Sometimes you play the program and the turn is too far, sometimes it doesn't turn enough and sometimes it works as expected. We have had similar problems before with other complex myblocks that seem to misbehave when run in as part of a long program but work fine when run by themselves.
I'm not sure the best way to attach code, so I've linked it to the file here.
https://drive.google.com/file/d/0B9eJwUXdFba-T3k0cTdYNTJ0eWc/view?usp=sharing