Merge pull request #2109 from nickvergessen/ticket/11581

[ticket/11581] Hide categories on level 0 when they have no visible children
Merge remote-tracking branch 'EXreaction/ticket/10288' into develop

* EXreaction/ticket/10288:
  [ticket/10288] Test to make sure included templates have proper variable scope