Maybe debug mode caused the CSS to be re-compiled, while your page still used the old CSS file. The error page for the missing CSS file could have been rendered with text/html MIME type and caused that error.
Just a guess.
If it's reproducible, you should try to see where that text/html type comes from. Maybe looking at the content of the CSS file in the browser network console will give some hints.