offset_mesh: Harden against degenerate meshes