Ok a client side fix does not make sense there. This needs to be resolved on partial response writer level.
The myfaces ppr should introduce CDATA escapes aka the script should become:
var a && b;
This is perfectly viable since more than one cdata section can follow the update.
The CDATA Escaping code still is present in the partial response writer, so I assume the comment with the CDATA section must be lost earlier.