Update closeSubViews to work correctly with key caching