Flyout close fix

Fixes #1487.

I was working on the Flyout animation, then I realized I was committing everything to my master branch, which I reverted, so there are 6 useless commits.