fixed issue #435

I fixed the issue described in #435. I believe it was connected with transcluding the same DOM element again and again. Now it's done once and the result is cached.

I also prepared a test case for this scenario.