Close old views after render

Fixes a bug that was introduced with the new sidebar region.