Fix duplicate indices in rigid body and collision shape add.