CDATA sections do not form part of the XSLT object model, and so should be "invisible" to an XSLT engine, even if the parser chooses to put them into the DOM which is passed to the XSLT processor.
Something like the fix you have written will be needed for the case you have spotted, and I am sure that there are other repercussions of this design flaw which will need to be checked...
2009-01-25 21:19:57 UTC in TurboPower XML Partner