Fixes innerHTML selection under IE8 for inline templates