Fixed a bug where rendering a paletted image would use the local palette.