[BUG #8341] - Wrong behavior while switching themes