Fixed semantic error that caused infinite loop bug in OptimalSizeForTexture().