Remove duplicate begin document.