title: Mailbox directory not changed after IMAP account switch
body: <p>In my configuration I have two online IMAP accounts, say <code>A</code> and <code>B</code>.
  My simplified configuration file looks like that:</p>
  
  <pre><code>## Account A settings
  source ~/.mutt/a/config
  folder-hook 'a.com' 'source ~/.mutt/a/config'
  
  ## Account B settings
  folder-hook 'b.com' 'source ~/.mutt/b/config'
  
  macro index &lt;f2&gt; '&lt;sync-mailbox&gt;&lt;enter-command&gt;source ~/.mutt/a/config&lt;enter&gt;&lt;change-folder&gt;!&lt;enter&gt;'
  macro index &lt;f3&gt; '&lt;sync-mailbox&gt;&lt;enter-command&gt;source ~/.mutt/b/config&lt;enter&gt;&lt;change-folder&gt;!&lt;enter&gt;'
  </code></pre>
  
  <p>Configuration files of both accounts are similar and looks like this:</p>
  
  <pre><code>set imap_user = usera
  set imap_pass = userasecret
  unset folder
  set folder    = "imaps://mail.a.com/"
  set spoolfile = "+INBOX"
  mailboxes "+INBOX"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>set imap_user = userb
  set imap_pass = userbsecret
  unset folder
  set folder    = "imaps://mail.b.com/"
  set spoolfile = "+INBOX"
  mailboxes "+INBOX"
  </code></pre>
  
  <p>I can switch between accounts using <code>F2</code> nad <code>F3</code> keys, but the problem is when I try to change the mailbox. At the beginning (i.e., before using <code>F-key</code>) pressing <code>c?</code> gives me the list of available IMAP folders. However, when I switch to the second account - by pressing <code>F3</code> - and then try to list IMAP folders there is an error. Mutt try to fetch folders from the first server: <code>imaps://mail.a.com</code> and fails because of the wrong credentials (as <code>imap_user</code> is already set to userb). I have to wait a while, then press <code>c</code> again and change the directory name to the current <code>folder</code> variable value. After this operation I can list the folders again. Until the next switch...</p>
  
  <p>Why is mutt sticking with the old directory path after changing the folder and how can I change this behaviour?</p>