Chris
The same code is shown in a few other threads reporting difficulties, although I don't see an actual explanation as to why.
The simplified version is also seen sometimes (as solution) and I have used it myself for about 7 years on many Cortex Ms (including Kinetis KE,KV, KL and Ks) without any issues.
At a guess I would suggest that
i &= 0x0000ffff;
is dangerous since the bits 0x0000003 are write-only and if they "were" to read back '1' and not zero the command would be bad.
ARM writes that these bits should be written only with '0' since they are reserved for debug usage and a write with '1' could cause unpredicatable behaviour: ARM Information Center
i &= 0x00000300 would be theoretically correct (to preserve the interrupt priority grouping field) but since you are resetting it is also not really of any relevance.
Regards
Mark
Kinetis: µTasker Kinetis support
For the complete "out-of-the-box" Kinetis experience and faster time to market