Better handling of parsing snippets. Fixes #739.