Geometry: Added some extra checks in Triangle.
XFEM: Added safety check in EnrichmentItem.