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

CRAFTERCMS-799