title: Using expand/collapsed on a maximized window work only once
body: <p>I have a window which I maximize after it is shown. Now my customer needs to minimize/maximize it so I added the minimize/maximize tools like so</p>
  
  <pre><code>tools:[{
      type: 'minimize',
      handler: function(event, target, owner, tool){
          owner.up('window').collapse();
      }
  },{
      type: 'maximize',
      handler: function(event, target, owner, tool){
          owner.up('window').expand();
  
      }
  }]
  </code></pre>
  
  <p>This works fine for one time. After that the minize button does nothing and the window stays maximized. It work again for one time when I close and reopen the window so it seems to be a sortt of reference problem. The console prints no error.</p>