fix($compile): support text inside multi-element directive

Fixed problems with text inside multi-element directives which resulted in a TypeError: Object #<Text> has no method 'hasAttribute'