Highlight Flagged in sidebar only if there are available actions?

The “Flagged” tab in the sidebar shows the orange highlight strip if there are any remaining (available or deferred) flagged tasks. Is there a way to only show the highlight for available tasks? Thank you!