EZP-22152: Fixed debug of legacy templates list when not in pure web context