Fix a few scoping issues with versionadded/versionchanged directives.