So it seems that when I insert a code snippet the class attribute (containing the markup language identifier, e.g. class="brush:xml;") is getting stripped out of the pre tag that's surrounding the code. It can't be CKEditor at fault because in plugins/ckeditor/lib/config.js:
config.allowedContent = true; // disable ACF
So it must be HTML Purifier, right? Except everything I've read suggests it isn't that aggressive, and will leave class attributes alone.
Anyway, a little help here would be appreciated :)