SpriteBatch flush() throwing exception when lastTexture is null

Issue #1211