And this bit of logic is not needed:

```
      if (hasTranscludeDirective) {
        nodeLinkFn.transclude = childTranscludeFn;
      } else if (!templateDirective) {
        nodeLinkFn.transclude = childTranscludeFn;
      }
```

since in our original diff, on line 955 (https://github.com/vojtajina/angular.js/commit/e10bd887c3d41eea3dc124f715bec42439d2efd4#diff-a732922b631efed1b9f33a24082ae0dbL955) we use `nodeLinkFn.transclude || transcludeFn` which is the same as what is happening in this method, since on line 1183 (https://github.com/petebacondarwin/angular.js/blob/57cc7be3af50d701f1df8f6a74475e0d04433d90/src/ng/compile.js#L1183) we assign `childTranscludeFn = transcludeFn`.