Fix style sheet parsing

This is for #9875.

This PR is a squashed version of https://github.com/adobe/brackets/pull/9952.