Revert "[DOM]: Don't cache throw away elements."

This reverts commit 36fb05950744a02f97c1aef2789a5220e9d12397.
[DOM] Build
Merge branch 'dev-master' into dev-3.x