How to remove category from RSS feed in WordPress 3.1.x?

About 2 years ago I started using the following code in my functions.php to omit a category (in this example #17) from my RSS feed. However, since I upgraded WP to the latest 3.1 and 3.1.1, this code appears to be broken. Does anyone have an idea what I need to change to stay updated and continue to omit a feed from the RSS?

Here is the code:

function myFilter($query) {
    if ($query->is_feed) {
        $query->set('cat','-17');
    }
return $query;
}
add_filter('pre_get_posts','myFilter');