Merge pull request #755 from fabro-sh/fix/template-dependency-discovery