Fix a bug in how element offsets are calculated for mixed meshes.