Hrm, interesting. I can't reproduce this:
[root@dev ~]# cat /etc/httpd/conf.d/test.conf
Header set X-Ping "Pong"
[root@dev ~]# GET -SedH 'Accept-Encoding: gzip, deflate' 'http://localhost/test.txt'
GET http://localhost/test.txt --> 200 OK
[root@dev ~]# GET -SedH 'Accept-Encoding: gzip, deflate' 'http://localhost/test.txt?foo'
GET http://localhost/test.txt?foo --> 200 OK
(unrelated headers removed)
As mentioned above,
FilesMatch matches filesystem paths, not URIs. Are the resources that aren't being compressed files on the filesystem or are they generated on the fly, or proxied, or redirected or something else that breaks direct URI-to-filesystem mapping? You could try using LocationMatch instead, which is probably a better bet anyway if any part of your app isn't static files.