Restore transforms of views participating in a swap to identity when done.
Handle case where we are calling setMainViewController with the same view controller that is currently the main one. In this case just call close.