Loose edge count was double. It didn't fail on own tests because they had a small number of loose edges, but for bigger meshes it hit garbage indices at draw time and crashed. Also cleaned up the code to make it less verbose and easier to understand how indices are counted. Hope it's the last edge-related fix (fingers crossed)