Use an advanced theme to override the sidepanel(...) function. In your version, check if $this->content['navigation']['cat'] is empty. If so it means that a category list hasn't been passed through to the theme, and you need to create one. In that case you want to set it up as follows:
global $qa_db;
$categories=qa_db_single_select($qa_db, qa_db_categories_selectspec());
$this->content['navigation']['cat']=qa_category_navigation($categories);
Then your overriding function should call the default sidepanel(...) one as usual.