Improve static keeping of the views

Replaces https://github.com/joomla/joomla-cms/pull/3462