Reusing a template style in two or more templates that are stacked will trigger an additional link element after the first, something like
<div class="foo">…</div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r18514604"> <div class="foo">…</div>
The additional link element interferes with the adjacent sibling combinator, making it necessary to write really weird selectors.
The more proper solution would be to use the logging facility, or even the more obvious; to cache use of template styles and reuse previous instances as necessary.