Fix particle box

- fix bug that memory writes in setAsLastFrame and setAsFirstFrame are not in order

This bug was not triggered by the current `dev` or `master` branche.

~~**PLEASE do not merge, I think our compile suite isn't working.**~~
Please add a newline here