MDL-45535 CSS chunking breaks media rules if CSS invalid (IE)

Invalid CSS with extra } symbols, which previously (by fluke)
worked, was broken by recent chunking improvements. This change
makes the chunking code robust against this (stupid) situation.