Fixed the bug causing exception when the first edge in generated sweep occurs to be degenerated. Comments have been added. Test-case for issue #25453