Track template dependencies