Theme: Correctly override active dropdown items in collapsed navbars

Fixes #14381.

/cc @mdo