Fix a bug in TextureLayoutTexture::Generate()