Removing extra `@parent` from output [issue #4942]

- Removes `@parent` from content before returning from `Environment::yieldContent`
- Simplifies `Environment::extendSection` method