Revive viewDidMoveToWindow for avoiding problems when adding the view to a new view hierarchy