I am currently modelling a complicated gearbox and I am using drivers to model the relations between the parts. There are multiple gears turning in different ratios and to each gear, a few parts are attached. I used drivers to couple the rotation ratios of the gears and then parented all parts that turn with the gears to those respective gears. The rotational axis of all gears are in the y-direction. This all works completely and looks great. However, if I rotate the model around the z axis for 90 degrees, all rotations glitch at a certain point and jump for a few degrees. The really weird thing is, if I rotate the model 90 degrees in 5 degree increments at a time, everything is back to normal again and the model works in every direction. Is this some kind of weird glitch? Is this a known bug? Is there anything I can do to fix it?
Minimal example