[BUGFIX] Fix inheritance of selected templates

Template selection in a parent page was not being properly inherited by a child page regarding backend layout. Includes some cosmetics as bonus.