do not throw exceptions for invalid DOM, just log problems
(e.g. http://youtrack.jetbrains.com/issue/IDEA-98943)
(cherry picked from commit 3d027ff)