The $ at the end of your regular expression will match the end of the URL, so if there is anything after the file extension, it won't match. You could omit the $ but then it would match if there was a ".css" etc. anywhere in the URL. Something like the example below might be safer. This should match either ".css" at the end of URL, or ".css" followed by ?, some parameters, and then the end of the URL.
<IfModule mod_deflate.c><FilesMatch "\.(css|js|x?html?|php)($|\?.*$)"> SetOutputFilter DEFLATE</FilesMatch></IfModule>