The textures are broken because I misunderstood that the texture coordinates must correlate with vertices, not elements.