Fix templateDependees crash