Fix for proper view removal

Note: there’s a bug where there’s an error when hard reloading the New
View page.
But that’s already fixed in master.