Fix 500 error in CI lint when included templates are an array Closes #66605 See merge request gitlab-org/gitlab-ce!32232