Fixes creating snippets in certain sections.

Adds support for creating snippets in sections with existing
overlapping snippets.