Inline `parse_svn` to avoid leaky state

As noted in review, `in_svn` is not properly reset to false. This is better anyway to not leak state.