Fix bug in StaticGeometryPerMaterialBatch