Patch for Trac:9934.

This fixes the issue with [Trac:9934](http://dev.ckeditor.com/ticket/9934). Based on a [patch](https://dev.ckeditor.com/attachment/ticket/7175/7175_2.patch) from a [similar issue](https://dev.ckeditor.com/ticket/7175).