Fixed corruption during patching caused by commit 975fe00
Added workaround regexes for sloppyPrint()'s inconsistent line endings inside comments
Added sloppy parser patterns to recognize empty XML comments and CDATA