Fixed an issue caused by reloading spritesheets with trimmed textures.

Also made the drawing of said textures slightly faster and more robust.