Fixed animation offsets when reusing a frame.

Made sure to apply the image offsets and dimensions in that specific order once per frame on animations, even when using the same image several times.

Fixes #311