Use the current-window if it matches, not the first match.