Fix issue 410: Unexpected drawing behaviour on empty layer with Transparent Color index set to non-0

When we create a new image for the sprite, we've to adjust the image mask
color to the sprite mask color (as the image isn't in the Stock yet).
This problem appears in v1.0.1 (9dfec919e4b35502fdeb88ca5c10b41af3faa9a5)
because now we don't change the mask color of sprite images in the
rendering process. This kind of bug can be detected running on debug
mode with an assert in the render procedure.