erm, hah! I see now. Looks like more c/p gone bad (luckily you guys are here to spot them)

It should of course be at the top of the loop. The intention was to detect any noops before introducing pipeline stalls by uploading textures needlessly.

But as discussed in another comment, I'll move these checks into MergeSimilar in the scene graph instead, so that the renderer will get pre-validated batches.