What I can see in the rrors log is this:
[10-Mar-2010 10:15:21] PHP Fatal error: Call to a member function connect() on a non-object in /usr/share/roundcube/program/include/rcmail.php on line 408
However, I am not sure if it has anything to do with the described problem, since this error occurs only twice in the logs, whereas I have tested the logging out many more times.
And the behaviour remains the same also when I change
$rcmail_config['sieverules_folder_encoding'] = null;
to
$rcmail_config['sieverules_folder_encoding'] = 'UTF7-IMAP';
in config.inc.php .