Fix #4662 - Cancel button doesn't work in com_config if form validation fails

Fix for https://github.com/joomla/joomla-cms/issues/4662