fixed rare crash.

two fixes:
  - filter out additional degenerate triangles;
  - don't use alpha masks after hitting a degenerate triangle.