Fixed an issue that caused the background of panning sprites to disappear on some browsers.

This affects at least Firefox on 64-bit Windows 7. Offset values are now
reduced to the smallest (correct) value possible on each update.