[4.2] Graceful `@parent` directive handling [#4942]

Remove `@parent` from output contents when the section hasn't been previously extended.

Addresses #4942 for version 4.2