Workaround for gcc 4.4.1 switch statement compiler bug on ARM/Due, causing some variable operations to be optimised out entirely.