workaround IE bug in tests with innerHTML when element contains zero-length text nodes
workaround for IE bug with insertBefore and undefined reference node