Fixes sprite add to work with non-power of two subimages.