Fix NPE with JS completion in HTML file.