> It seems a shame to lose this optimization. Can we move the call to count_flatshaded_attributes() up to the declaration of nr, and then we can keep this? This function isn't even called if there is no flat-shading to do.