Sorry to say, but this is not a fix. A fix would avoid the race condition, no matter whats written in the config files.
Your "fix" is just a workaround. If I add
/var/log/logfile1
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
 /usr/lib/rsyslog/rsyslog-rotate
 endscript
}
/var/log/logfile2
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
 /usr/lib/rsyslog/rsyslog-rotate
 endscript
}
in another config file, then the problem is back.

