CRAFTERCMS-799
Fixed bug that was allowing self dependency for templates (templates adds dependency to itself)
Merge pull request #211 from dejan-brkic/2.2.x

CRAFTERCMS-799