Fix mipmap count and potential crash for non square textures that are allocated with...