fix(compile): Collecting directives from tags that will be replaced

Fix the collecting of element directives from tags that will get replaced
by another directive on an attribute. If the element has an attribute
or class directive that will replace the entire element, then do not
collect the element directive on the tag

Closes #2573

BREAKING CHANGE:
* Will break directives that made the assumption that any element directive
on the replaced tag would get collected
* Will break element directives that expect to be collected twice when they
were replaced by another directive