Added compatibility with use of transclude in directive

The service as it is doesn't work with ng-transclude (for directives with transclude:true), it causes an "ng-transclude orphan" error. This fixes it.