Fix the old subclassing-causes-window-to-be-unclosable bug, introduced since Viewport was first added.