Small refactor of the template code

Make the inheritance merge strategy explicit, using either the EXTENDS
or REPLACES attributes. Multi-file YAML merge implicitly uses EXTENDS.
1 job for recursive_extend_test in 24 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #5742
run_tests

00:00:24