Fixes 1593.  https://github.com/joomla/joomla-cms/issues/1593