made sure dependency relations get properly added when created by a template