When a forum is in grouping mode, its RSS feed throws SQL error. The file mod/forum/rsslib.php is a mess, looks like being in the middle on transitioning/refactoring.
Reading through the code, I think the grouping handling code was added later in 5/2010, but because the caching relied on the exact hardcoded SQL, whereas the new code tried to be compliant with passing in params separately. Thus, some functions set up the $params variable but never returned it to be passed into $DB->get_records_sql().
I cleaned the codes, ran some smoke testing. Attached is the patch file (no git URL, forgive me for being afraid of endless rebasing a git branch, and also the 2.3 branch might have conflict for it has cleaned up the doc-block)